|
|
689258 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
689258 |
From: Keith Seitz <keiths@redhat.com>
|
|
|
689258 |
Date: Fri, 11 Jan 2019 17:02:18 -0500
|
|
|
689258 |
Subject: gdb-rhbz1187581-power8-regs-not-in-8.2-13of15.patch
|
|
|
689258 |
|
|
|
689258 |
;; [PowerPC] Reject tdescs with VSX and no FPU or Altivec
|
|
|
689258 |
;; Pedro Franco de Carvalho, RH BZ 1187581
|
|
|
689258 |
|
|
|
689258 |
[PowerPC] Reject tdescs with VSX and no FPU or Altivec
|
|
|
689258 |
|
|
|
689258 |
Currently rs6000_gdbarch_init will accept a tdesc with the
|
|
|
689258 |
"org.gnu.gdb.power.vsx" feature but without the
|
|
|
689258 |
"org.gnu.gdb.power.altivec" or "org.gnu.gdb.power.fpu".
|
|
|
689258 |
|
|
|
689258 |
It isn't clear from the standard features documentation that these are
|
|
|
689258 |
requirements. However, these tdescs would cause trouble in the VSX
|
|
|
689258 |
pseudo-register functions, so this patch will cause them to be
|
|
|
689258 |
rejected.
|
|
|
689258 |
|
|
|
689258 |
gdb/ChangeLog:
|
|
|
689258 |
2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
|
|
|
689258 |
|
|
|
689258 |
* rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
|
|
|
689258 |
without altivec or fpu.
|
|
|
689258 |
|
|
|
689258 |
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
|
|
|
689258 |
--- a/gdb/rs6000-tdep.c
|
|
|
689258 |
+++ b/gdb/rs6000-tdep.c
|
|
|
689258 |
@@ -6096,7 +6096,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|
|
689258 |
valid_p &= tdesc_numbered_register (feature, tdesc_data,
|
|
|
689258 |
PPC_VSR0_UPPER_REGNUM + i,
|
|
|
689258 |
vsx_regs[i]);
|
|
|
689258 |
- if (!valid_p)
|
|
|
689258 |
+
|
|
|
689258 |
+ if (!valid_p || !have_fpu || !have_altivec)
|
|
|
689258 |
{
|
|
|
689258 |
tdesc_data_cleanup (tdesc_data);
|
|
|
689258 |
return NULL;
|