aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-02-07 15:06:33 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2003-02-07 15:06:33 +0000
commit09b8f35ab28afe82b9841339b83746bf3b2a3575 (patch)
tree4ff4743015ce2526d98935fa288cbd0e8bdb453e /gas/testsuite
parent589e6347e9c78e09e51a5cebcd022a5ef995048a (diff)
downloadgdb-09b8f35ab28afe82b9841339b83746bf3b2a3575.zip
gdb-09b8f35ab28afe82b9841339b83746bf3b2a3575.tar.gz
gdb-09b8f35ab28afe82b9841339b83746bf3b2a3575.tar.bz2
* config/tc-mips.c (my_getSmallExpression): Rework bracket handling.
testsuite/ * gas/mips/expr1.[sd]: New test. * gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/mips/expr1.d19
-rw-r--r--gas/testsuite/gas/mips/expr1.s10
-rw-r--r--gas/testsuite/gas/mips/mips.exp1
4 files changed, 35 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index caa45a8..0bbc35a 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2003-02-07 Richard Sandiford <rsandifo@redhat.com>
+
+ * gas/mips/expr1.[sd]: New test.
+ * gas/mips/mips.exp: Run it.
+
2003-02-06 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
* gas/i386/x86-64-opcode.s: More tests for x86-64 MOVD opcodes.
diff --git a/gas/testsuite/gas/mips/expr1.d b/gas/testsuite/gas/mips/expr1.d
new file mode 100644
index 0000000..9b8286f
--- /dev/null
+++ b/gas/testsuite/gas/mips/expr1.d
@@ -0,0 +1,19 @@
+#as: -march=mips2 -mabi=32
+#objdump: -M gpr-names=numeric -dr
+#name: MIPS expression 1
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+00 <foo>:
+ 0: 8c840000 lw \$4,0\(\$4\)
+ 0: R_MIPS_LO16 foo
+ 4: 8c840038 lw \$4,56\(\$4\)
+ 8: 8c840008 lw \$4,8\(\$4\)
+ 8: R_MIPS_LO16 foo
+ c: 8c840008 lw \$4,8\(\$4\)
+ c: R_MIPS_LO16 foo
+ 10: 8c840008 lw \$4,8\(\$4\)
+ 10: R_MIPS_LO16 foo
+ \.\.\.
diff --git a/gas/testsuite/gas/mips/expr1.s b/gas/testsuite/gas/mips/expr1.s
new file mode 100644
index 0000000..3f9677d
--- /dev/null
+++ b/gas/testsuite/gas/mips/expr1.s
@@ -0,0 +1,10 @@
+ .globl foo
+ .ent foo
+foo:
+ lw $4,%lo(foo)($4)
+ lw $4,((10 + 4) * 4)($4)
+ lw $4,%lo (2 * 4) + foo($4)
+ lw $4,%lo((2 * 4) + foo)($4)
+ lw $4,(((%lo ((2 * 4) + foo))))($4)
+ .space 64
+ .end foo
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 43b2193..090e0b5 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -618,6 +618,7 @@ if { [istarget mips*-*-*] } then {
run_dump_test "${tmips}mips${el}16-f"
}
run_dump_test "elf-consthilo"
+ run_dump_test "expr1"
}
if $has_newabi {