aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-07-08 08:39:32 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-07-08 08:39:32 +0000
commit0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c (patch)
tree11299aec64e03d53ab597ce559e0e2e010913f48 /gas/testsuite
parent93161bef4c9e9bb7dd92eff1b1b3fa9ebf50c5ac (diff)
downloadgdb-0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c.zip
gdb-0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c.tar.gz
gdb-0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c.tar.bz2
gas/
* config/tc-mips.c (mips_ip): Unconditionally parse an expression for 'A' and assume that the constant has been elided if the result is an O_register. gas/testsuite/ * gas/mips/la.s, gas/mips/la.d, gas/mips/la-svr4pic.d, gas/mips/la-xgot.d: Add tests for bracketed addresses.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/mips/la-svr4pic.d12
-rw-r--r--gas/testsuite/gas/mips/la-xgot.d18
-rw-r--r--gas/testsuite/gas/mips/la.d15
-rw-r--r--gas/testsuite/gas/mips/la.s5
5 files changed, 55 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 196e238..e1e9689 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-08 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gas/mips/la.s, gas/mips/la.d, gas/mips/la-svr4pic.d,
+ gas/mips/la-xgot.d: Add tests for bracketed addresses.
+
2013-07-07 Richard Sandiford <rdsandiford@googlemail.com>
* gas/mips/ldstla-32.d: Avoid "lui at,0x0" sequences for
diff --git a/gas/testsuite/gas/mips/la-svr4pic.d b/gas/testsuite/gas/mips/la-svr4pic.d
index d53580f..686db03 100644
--- a/gas/testsuite/gas/mips/la-svr4pic.d
+++ b/gas/testsuite/gas/mips/la-svr4pic.d
@@ -453,4 +453,16 @@ Disassembly of section .text:
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
[0-9a-f]+ <[^>]*> addu a0,a0,at
[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,a1,0
+[0-9a-f]+ <[^>]*> lui a0,0x12
+[0-9a-f]+ <[^>]*> ori a0,a0,0x3456
+[0-9a-f]+ <[^>]*> lui a0,0x12
+[0-9a-f]+ <[^>]*> ori a0,a0,0x3456
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
+[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
+[0-9a-f]+ <[^>]*> lw a0,0\(gp\)
+[ ]*[0-9a-f]+: R_MIPS_GOT16 big_external_data_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
...
diff --git a/gas/testsuite/gas/mips/la-xgot.d b/gas/testsuite/gas/mips/la-xgot.d
index 50cc37c83..168a72d 100644
--- a/gas/testsuite/gas/mips/la-xgot.d
+++ b/gas/testsuite/gas/mips/la-xgot.d
@@ -597,4 +597,22 @@ Disassembly of section .text:
[ ]*[0-9a-f]+: R_MIPS_LO16 .bss
[0-9a-f]+ <[^>]*> addu a0,a0,at
[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,a1,0
+[0-9a-f]+ <[^>]*> lui a0,0x12
+[0-9a-f]+ <[^>]*> ori a0,a0,0x3456
+[0-9a-f]+ <[^>]*> lui a0,0x12
+[0-9a-f]+ <[^>]*> ori a0,a0,0x3456
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
+[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
+[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
+[0-9a-f]+ <[^>]*> lui a0,0x0
+[ ]*[0-9a-f]+: R_MIPS_GOT_HI16 big_external_data_label
+[0-9a-f]+ <[^>]*> addu a0,a0,gp
+[0-9a-f]+ <[^>]*> lw a0,0\(a0\)
+[ ]*[0-9a-f]+: R_MIPS_GOT_LO16 big_external_data_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
...
diff --git a/gas/testsuite/gas/mips/la.d b/gas/testsuite/gas/mips/la.d
index 449c6a2..7395014 100644
--- a/gas/testsuite/gas/mips/la.d
+++ b/gas/testsuite/gas/mips/la.d
@@ -378,4 +378,19 @@ Disassembly of section .text:
[0-9a-f]+ <[^>]*> addiu a0,a0,[-0-9]+
[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* .sbss.*
[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> addiu a0,a1,0
+[0-9a-f]+ <[^>]*> lui a0,0x12
+[0-9a-f]+ <[^>]*> ori a0,a0,0x3456
+[0-9a-f]+ <[^>]*> lui a0,0x12
+[0-9a-f]+ <[^>]*> ori a0,a0,0x3456
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
+[0-9a-f]+ <[^>]*> lui a0,0x0
+[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
+[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
+[0-9a-f]+ <[^>]*> lui a0,0x0
+[ ]*[0-9a-f]+: [A-Z0-9_]*HI[A-Z0-9_]* big_external_data_label
+[0-9a-f]+ <[^>]*> addiu a0,a0,0
+[ ]*[0-9a-f]+: [A-Z0-9_]*LO[A-Z0-9_]* big_external_data_label
+[0-9a-f]+ <[^>]*> addu a0,a0,a1
...
diff --git a/gas/testsuite/gas/mips/la.s b/gas/testsuite/gas/mips/la.s
index dd0bff6..2a6f99c 100644
--- a/gas/testsuite/gas/mips/la.s
+++ b/gas/testsuite/gas/mips/la.s
@@ -106,6 +106,11 @@ data_label:
la $4,small_external_common+0x1a5a5($5)
la $4,big_local_common+0x1a5a5($5)
la $4,small_local_common+0x1a5a5($5)
+ la $4,($5)
+ la $4,(0x123456)
+ la $4,(0x123456)($5)
+ la $4,(big_external_data_label)
+ la $4,(big_external_data_label)($5)
# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
.space 8