Improve boostrap-ubsan config (PR bootstrap/64914).
[deliverable/binutils-gdb.git] / gdb / ppc-linux-tdep.c
index 7362c4bbe19b8a3d16c7d1620e3e2b11fe6c21ac..c114bee23c9d4f46ffcb9669ba0399b8823dbf47 100644 (file)
@@ -553,10 +553,16 @@ static const struct regset ppc32_be_linux_vrregset = {
   ppc_linux_collect_vrregset
 };
 
+static const struct regcache_map_entry ppc32_linux_vsxregmap[] =
+  {
+      { 32, PPC_VSR0_UPPER_REGNUM, 8 },
+      { 0 }
+  };
+
 static const struct regset ppc32_linux_vsxregset = {
-  &ppc32_linux_reg_offsets,
-  ppc_supply_vsxregset,
-  ppc_collect_vsxregset
+  ppc32_linux_vsxregmap,
+  regcache_supply_regset,
+  regcache_collect_regset
 };
 
 const struct regset *
@@ -580,6 +586,12 @@ ppc_linux_vrregset (struct gdbarch *gdbarch)
     return &ppc32_le_linux_vrregset;
 }
 
+const struct regset *
+ppc_linux_vsxregset (void)
+{
+  return &ppc32_linux_vsxregset;
+}
+
 /* Iterate over supported core file register note sections. */
 
 static void
@@ -806,7 +818,7 @@ ppc_linux_get_syscall_number (struct gdbarch *gdbarch,
   /* Getting the system call number from the register.
      When dealing with PowerPC architecture, this information
      is stored at 0th register.  */
-  regcache_cooked_read (regcache, tdep->ppc_gp0_regnum, buf.data ());
+  regcache->cooked_read (tdep->ppc_gp0_regnum, buf.data ());
 
   return extract_signed_integer (buf.data (), tdep->wordsize, byte_order);
 }
@@ -1046,6 +1058,13 @@ ppc_linux_core_read_description (struct gdbarch *gdbarch,
   if (vsx)
     features.vsx = true;
 
+  CORE_ADDR hwcap;
+
+  if (target_auxv_search (target, AT_HWCAP, &hwcap) != 1)
+    hwcap = 0;
+
+  features.isa205 = ppc_linux_has_isa205 (hwcap);
+
   return ppc_linux_match_description (features);
 }
 
This page took 0.024314 seconds and 4 git commands to generate.