aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>2023-03-06 01:31:34 -0600
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2023-03-07 10:54:53 +0100
commit60204874f5a987b164f7f194d3f96729847fe329 (patch)
tree9f5e52df88312b1e31e3863396616a9e6e168900
parente8850b52624245a1d7b8ef9fc41abb6175ec74e4 (diff)
downloadbinutils-60204874f5a987b164f7f194d3f96729847fe329.zip
binutils-60204874f5a987b164f7f194d3f96729847fe329.tar.gz
binutils-60204874f5a987b164f7f194d3f96729847fe329.tar.bz2
Modify altivec-regs.exp testcase for AIX
On AIX, the debugger cannot access vector registers before they are first used by the inferior. Hence we change the test case such that some vector registers are accessed by the variable 'x' in AIX and other targets are not affected as a consequence of the same.
-rw-r--r--gdb/testsuite/gdb.arch/altivec-regs.c8
-rw-r--r--gdb/testsuite/gdb.arch/altivec-regs.exp3
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.c b/gdb/testsuite/gdb.arch/altivec-regs.c
index 8f3b729..1411f15 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.c
+++ b/gdb/testsuite/gdb.arch/altivec-regs.c
@@ -20,12 +20,18 @@ main ()
vector unsigned int z;
int a;
+ #ifdef _AIX
+ /* On AIX, the debugger cannot access vector registers before they
+ are first used by the inferior. Perform such an access here. */
+ x = ((vector unsigned int) vec_splat_u8 (0));
+ #endif
+
/* This line may look unnecessary but we do need it, because we want to
have a line to do a next over (so that gdb refetches the registers)
and we don't want the code to change any vector registers.
The splat operations below modify the VRs,i
so we don't want to execute them yet. */
- a = 9;
+ a = 9; /* start here */
x = ((vector unsigned int) vec_splat_u8 (-2));
y = ((vector unsigned int) vec_splat_u8 (1));
diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp
index 6cc32ae..b771a4d 100644
--- a/gdb/testsuite/gdb.arch/altivec-regs.exp
+++ b/gdb/testsuite/gdb.arch/altivec-regs.exp
@@ -52,6 +52,9 @@ if {![runto_main]} {
return 0
}
+gdb_breakpoint [gdb_get_line_number "start here"]
+gdb_continue_to_breakpoint "start here"
+
gdb_test "set print frame-arguments all"
# set all the registers integer portions to 1