diff options
author | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2011-02-15 13:35:23 +0000 |
---|---|---|
committer | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2011-02-15 13:35:23 +0000 |
commit | d9492458a11ca366f79a4c8fb03e312bfe0b047e (patch) | |
tree | e16cd6352e047f8b795d5ad30eddc569660c2453 /gdb/rs6000-tdep.c | |
parent | 6fa052f0483dfa6a9f57e530983aef1349a670a3 (diff) | |
download | gdb-d9492458a11ca366f79a4c8fb03e312bfe0b047e.zip gdb-d9492458a11ca366f79a4c8fb03e312bfe0b047e.tar.gz gdb-d9492458a11ca366f79a4c8fb03e312bfe0b047e.tar.bz2 |
gdb/
* rs6000-tdep.c (IS_EFP_PSEUDOREG): Use correct constant for
the EFP register set size.
(efpr_pseudo_register_read): Use regcache_raw_read_part to read
data from the VMX register.
(efpr_pseudo_register_write): Use regcache_raw_write_part to read
and write data from/to the VMX register.
gdb/testsuite/
* gdb.arch/vsx-regs.exp: Add "vector_register1_vr" and
"vector_register2_vr" test strings. Test the extended floating
point registers (F32~F63).
* lib/gdb.exp (skip_vsx_tests): Update compile flags for the
IBM XL C compiler. Make the test program use a register provided
by the compiler for the lxvd2x instruction.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r-- | gdb/rs6000-tdep.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 9832b5b..6ac3e8d 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -99,7 +99,7 @@ /* Determine if regnum is a POWER7 Extended FP register. */ #define IS_EFP_PSEUDOREG(tdep, regnum) ((tdep)->ppc_efpr0_regnum >= 0 \ && (regnum) >= (tdep)->ppc_efpr0_regnum \ - && (regnum) < (tdep)->ppc_efpr0_regnum + ppc_num_fprs) + && (regnum) < (tdep)->ppc_efpr0_regnum + ppc_num_efprs) /* The list of available "set powerpc ..." and "show powerpc ..." commands. */ @@ -2721,9 +2721,9 @@ efpr_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); int reg_index = reg_nr - tdep->ppc_efpr0_regnum; - /* Read the portion that overlaps the VMX registers. */ - regcache_raw_read (regcache, tdep->ppc_vr0_regnum + - reg_index, buffer); + /* Read the portion that overlaps the VMX register. */ + regcache_raw_read_part (regcache, tdep->ppc_vr0_regnum + reg_index, 0, + register_size (gdbarch, reg_nr), buffer); } /* Write method for POWER7 Extended FP pseudo-registers. */ @@ -2734,9 +2734,9 @@ efpr_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); int reg_index = reg_nr - tdep->ppc_efpr0_regnum; - /* Write the portion that overlaps the VMX registers. */ - regcache_raw_write (regcache, tdep->ppc_vr0_regnum + - reg_index, buffer); + /* Write the portion that overlaps the VMX register. */ + regcache_raw_write_part (regcache, tdep->ppc_vr0_regnum + reg_index, 0, + register_size (gdbarch, reg_nr), buffer); } static void |