* ppc-linux-tdep.c (ppc32_linux_reg_offsets): Corrected
	swapped offsets and VRSAVE offset.
	(ppc64_linux_reg_offsets): Corrected swapped offsets.
	(ppc32_linux_vrregset): Added.
	(ppc_linux_regset_from_core_section): Added support for
	.reg-ppc-vmx section.
	* ppc-tdep.h (ppc_altivec_support_p): Declare.
	(ppc_supply_vrregset): Declare.
	(ppc_collect_vrregset): Declare.
	* rs6000-tdep.c (ppc_altivec_support_p): Added.
	(ppc_supply_vrregset): Added.
	(ppc_collect_vrregset): Added.
	* corelow.c (get_core_registers): Added support for
	.reg-ppc-vmx section.
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 324cef7..323078e 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -650,8 +650,8 @@
 
     /* AltiVec registers.  */
     /* .vr0_offset = */ 0,
-    /* .vrsave_offset = */ 512,
-    /* .vscr_offset = */ 512 + 12
+    /* .vscr_offset = */ 512 + 12,
+    /* .vrsave_offset = */ 528
   };
 
 static const struct ppc_reg_offsets ppc64_linux_reg_offsets =
@@ -675,8 +675,8 @@
 
     /* AltiVec registers.  */
     /* .vr0_offset = */ 0,
-    /* .vrsave_offset = */ 528,
-    /* .vscr_offset = */ 512 + 12
+    /* .vscr_offset = */ 512 + 12,
+    /* .vrsave_offset = */ 528
   };
 
 static const struct regset ppc32_linux_gregset = {
@@ -700,6 +700,13 @@
   NULL
 };
 
+static const struct regset ppc32_linux_vrregset = {
+  &ppc32_linux_reg_offsets,
+  ppc_supply_vrregset,
+  ppc_collect_vrregset,
+  NULL
+};
+
 const struct regset *
 ppc_linux_gregset (int wordsize)
 {
@@ -726,6 +733,8 @@
     }
   if (strcmp (sect_name, ".reg2") == 0)
     return &ppc32_linux_fpregset;
+  if (strcmp (sect_name, ".reg-ppc-vmx") == 0)
+    return &ppc32_linux_vrregset;
   return NULL;
 }