aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2009-03-25 21:15:04 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2009-03-25 21:15:04 +0000
commitf04c6d38e2d725d7a813af49883eda0b07a91ad7 (patch)
treee21b61325c6faf914f1b0f8dd15cfdbee126d1e8 /gdb/ppc-linux-nat.c
parent41aacd835d8579739337737ae49209f688a86c8d (diff)
downloadfsf-binutils-gdb-f04c6d38e2d725d7a813af49883eda0b07a91ad7.zip
fsf-binutils-gdb-f04c6d38e2d725d7a813af49883eda0b07a91ad7.tar.gz
fsf-binutils-gdb-f04c6d38e2d725d7a813af49883eda0b07a91ad7.tar.bz2
gdb/
Fix size of FPSCR in Power 7 processors. * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define. (PPC_FEATURE_HAS_DFP): New #define. (ppc_linux_read_description): Check for DFP feature instead of ISA 2.05 to decide on size of the FPSCR. gdbserver/ Fix size of FPSCR in Power 7 processors. * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define. (PPC_FEATURE_HAS_DFP): New #define. (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on size of the FPSCR.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 034201b..b7e70d1 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -63,8 +63,8 @@
#ifndef PPC_FEATURE_BOOKE
#define PPC_FEATURE_BOOKE 0x00008000
#endif
-#ifndef PPC_FEATURE_ARCH_2_05
-#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */
+#ifndef PPC_FEATURE_HAS_DFP
+#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal Floating Point. */
#endif
/* Glibc's headers don't define PTRACE_GETVRREGS so we cannot use a
@@ -1290,7 +1290,13 @@ ppc_linux_read_description (struct target_ops *ops)
perror_with_name (_("Unable to fetch AltiVec registers"));
}
- if (ppc_linux_get_hwcap () & PPC_FEATURE_ARCH_2_05)
+ /* Power ISA 2.05 (implemented by Power 6 and newer processors) increases
+ the FPSCR from 32 bits to 64 bits. Even though Power 7 supports this
+ ISA version, it doesn't have PPC_FEATURE_ARCH_2_05 set, only
+ PPC_FEATURE_ARCH_2_06. Since for now the only bits used in the higher
+ half of the register are for Decimal Floating Point, we check if that
+ feature is available to decide the size of the FPSCR. */
+ if (ppc_linux_get_hwcap () & PPC_FEATURE_HAS_DFP)
isa205 = 1;
/* Check for 64-bit inferior process. This is the case when the host is