|
|
7ab123 |
commit 6ed14ff33979bc48367c35b1b235fef8c5e2229b
|
|
|
7ab123 |
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
|
|
|
7ab123 |
Date: Tue Feb 4 18:28:24 2014 +0100
|
|
|
7ab123 |
|
|
|
7ab123 |
PowerPC64 little-endian fixes: AltiVec tests
|
|
|
7ab123 |
|
|
|
7ab123 |
A couple of AltiVec tests fail spuriously on powerpc64le-linux, because
|
|
|
7ab123 |
they compare against an incorrect pattern. Note that those tests already
|
|
|
7ab123 |
contain little-endian variants of the patterns, but those seem to have
|
|
|
7ab123 |
bit-rotted a bit: when outputting a vector, GDB no longer omits trailing
|
|
|
7ab123 |
zero elements (as it used to do in the past).
|
|
|
7ab123 |
|
|
|
7ab123 |
This patch updates the pattern to the new GDB output behavior.
|
|
|
7ab123 |
|
|
|
7ab123 |
In addition, the patch updates the endian test to use the new
|
|
|
7ab123 |
gdb_test_multiple logic instead of gdb_expect.
|
|
|
7ab123 |
|
|
|
7ab123 |
gdb/testsuite/ChangeLog:
|
|
|
7ab123 |
|
|
|
7ab123 |
* gdb.arch/altivec-regs.exp: Use gdb_test_multiple for endian test.
|
|
|
7ab123 |
(decimal_vector): Fix for little-endian.
|
|
|
7ab123 |
|
|
|
7ab123 |
Index: gdb-7.6.1/gdb/testsuite/gdb.arch/altivec-regs.exp
|
|
|
7ab123 |
===================================================================
|
|
|
7ab123 |
--- gdb-7.6.1.orig/gdb/testsuite/gdb.arch/altivec-regs.exp
|
|
|
7ab123 |
+++ gdb-7.6.1/gdb/testsuite/gdb.arch/altivec-regs.exp
|
|
|
7ab123 |
@@ -79,17 +79,16 @@ gdb_test "set \$vrsave = 1" "" ""
|
|
|
7ab123 |
|
|
|
7ab123 |
gdb_test "next" "" ""
|
|
|
7ab123 |
|
|
|
7ab123 |
-send_gdb "show endian\n"
|
|
|
7ab123 |
set endianness ""
|
|
|
7ab123 |
-gdb_expect {
|
|
|
7ab123 |
+set msg "detect endianness"
|
|
|
7ab123 |
+gdb_test_multiple "show endian" "$msg" {
|
|
|
7ab123 |
-re "(The target endianness is set automatically .currently )(big|little)( endian.*)$gdb_prompt $" {
|
|
|
7ab123 |
- pass "endianness"
|
|
|
7ab123 |
- set endianness $expect_out(2,string)
|
|
|
7ab123 |
+ pass "$msg"
|
|
|
7ab123 |
+ set endianness $expect_out(2,string)
|
|
|
7ab123 |
}
|
|
|
7ab123 |
-re ".*$gdb_prompt $" {
|
|
|
7ab123 |
- fail "couldn't get endianness"
|
|
|
7ab123 |
+ fail "$msg"
|
|
|
7ab123 |
}
|
|
|
7ab123 |
- timeout { fail "(timeout) endianness" }
|
|
|
7ab123 |
}
|
|
|
7ab123 |
|
|
|
7ab123 |
# And then read the AltiVec registers back, to see that
|
|
|
7ab123 |
@@ -118,7 +117,7 @@ gdb_test "info reg vscr" "vscr.*0x1\t1"
|
|
|
7ab123 |
if {$endianness == "big"} {
|
|
|
7ab123 |
set decimal_vector ".uint128 = 0x00000001000000010000000100000001, v4_float = .1.*e-45, 1.*e-45, 1.*e-45, 1.*e-45., v4_int32 = .1, 1, 1, 1., v8_int16 = .0, 1, 0, 1, 0, 1, 0, 1., v16_int8 = .0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1.."
|
|
|
7ab123 |
} else {
|
|
|
7ab123 |
- set decimal_vector ".uint128 = 0x00000001000000010000000100000001, v4_float = .1.*e-45, 1.*e-45, 1.*e-45, 1.*e-45., v4_int32 = .1, 1, 1, 1., v8_int16 = .1, 0, 1, 0, 1, 0, 1, 0., v16_int8 = .1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.."
|
|
|
7ab123 |
+ set decimal_vector ".uint128 = 0x00000001000000010000000100000001, v4_float = .1.*e-45, 1.*e-45, 1.*e-45, 1.*e-45., v4_int32 = .1, 1, 1, 1., v8_int16 = .1, 0, 1, 0, 1, 0, 1, 0., v16_int8 = .1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.."
|
|
|
7ab123 |
}
|
|
|
7ab123 |
|
|
|
7ab123 |
for {set i 0} {$i < 32} {incr i 1} {
|