aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2001-09-07 05:00:37 +0000
committerThiemo Seufer <ths@networkno.de>2001-09-07 05:00:37 +0000
commitcb56d3d327dc7fd17dbc3e3f95131cb6b312f18e (patch)
tree35b652e23a7ce84c43b26d953323437cd503d94d /gas/testsuite
parentc0a1a2e89b45a2eff4279723544ed4fd69d5cbdf (diff)
downloadgdb-cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e.zip
gdb-cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e.tar.gz
gdb-cb56d3d327dc7fd17dbc3e3f95131cb6b312f18e.tar.bz2
* elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
of R_MIPS_PC16. * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL. (macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded PIC, BFD_RELOC_16_PCREL for the rest. (mips_ip): Likewise. (md_pcrel_from): return the right offset for the differently shifted pcrel relocs. (md_apply_fix): Handle BFD_RELOC_16_PCREL. * gas/mips/beq.d: Check branches to external labels. * gas/mips/beq.s: Likewise. * gas/mips/bge.d: Likewise. * gas/mips/bge.s: Likewise. * gas/mips/bgeu.d: Likewise. * gas/mips/bgeu.s: Likewise. * gas/mips/blt.d: Likewise. * gas/mips/blt.s: Likewise. * gas/mips/bltu.d: Likewise. * gas/mips/bltu.s: Likewise. * gas/mips/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16. * gas/mips/empic.d: Likewise. * gas/mips/empic.s: Likewise. * gas/mips/telempic.d: Likewise. * gas/mips/tempic.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog18
-rw-r--r--gas/testsuite/gas/mips/beq.d6
-rw-r--r--gas/testsuite/gas/mips/beq.s6
-rw-r--r--gas/testsuite/gas/mips/bge.d16
-rw-r--r--gas/testsuite/gas/mips/bge.s6
-rw-r--r--gas/testsuite/gas/mips/bgeu.d16
-rw-r--r--gas/testsuite/gas/mips/bgeu.s6
-rw-r--r--gas/testsuite/gas/mips/blt.d16
-rw-r--r--gas/testsuite/gas/mips/blt.s6
-rw-r--r--gas/testsuite/gas/mips/bltu.d16
-rw-r--r--gas/testsuite/gas/mips/bltu.s6
11 files changed, 116 insertions, 2 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index f0422b0..a037123 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,21 @@
+2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * gas/mips/beq.d: Check branches to external labels.
+ * gas/mips/beq.s: Likewise.
+ * gas/mips/bge.d: Likewise.
+ * gas/mips/bge.s: Likewise.
+ * gas/mips/bgeu.d: Likewise.
+ * gas/mips/bgeu.s: Likewise.
+ * gas/mips/blt.d: Likewise.
+ * gas/mips/blt.s: Likewise.
+ * gas/mips/bltu.d: Likewise.
+ * gas/mips/bltu.s: Likewise.
+ * gas/mips/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16.
+ * gas/mips/empic.d: Likewise.
+ * gas/mips/empic.s: Likewise.
+ * gas/mips/telempic.d: Likewise.
+ * gas/mips/tempic.d: Likewise.
+
2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* gas/mips/tmips16-f.d: New file, testcase for big endian MIPS16
diff --git a/gas/testsuite/gas/mips/beq.d b/gas/testsuite/gas/mips/beq.d
index 2fa90f5..9eb2434 100644
--- a/gas/testsuite/gas/mips/beq.d
+++ b/gas/testsuite/gas/mips/beq.d
@@ -37,4 +37,10 @@ Disassembly of section .text:
0+2006c <[^>]*> nop
0+20070 <[^>]*> jal 0+0000 <text_label>
[ ]*20070: (MIPS_JMP|JMPADDR|R_MIPS_26) .text
+0+20074 <[^>]*> nop
+0+20078 <[^>]*> b 0+20078 <text_label\+0x20078>
+[ ]*20078: R_MIPS_PC16 external_label
+0+2007c <[^>]*> nop
+0+20080 <[^>]*> bal 0+20080 <text_label\+0x20080>
+[ ]*20080: R_MIPS_PC16 external_label
...
diff --git a/gas/testsuite/gas/mips/beq.s b/gas/testsuite/gas/mips/beq.s
index 9922eec..5567f02 100644
--- a/gas/testsuite/gas/mips/beq.s
+++ b/gas/testsuite/gas/mips/beq.s
@@ -22,7 +22,9 @@ text_label:
b text_label
bal text_label
+# Branch to an external label.
+ b external_label
+ bal external_label
+
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
- nop
- nop
diff --git a/gas/testsuite/gas/mips/bge.d b/gas/testsuite/gas/mips/bge.d
index 387fd34..8ade2ad 100644
--- a/gas/testsuite/gas/mips/bge.d
+++ b/gas/testsuite/gas/mips/bge.d
@@ -50,4 +50,20 @@ Disassembly of section .text:
0+00a4 <[^>]*> nop
0+00a8 <[^>]*> slt at,a1,a0
0+00ac <[^>]*> bnezl at,0+0000 <text_label>
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> slt at,a0,a1
+0+00b8 <[^>]*> beqz at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> slt at,a1,a0
+0+00c4 <[^>]*> bnez at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
+0+00c8 <[^>]*> nop
+0+00cc <[^>]*> slt at,a0,a1
+0+00d0 <[^>]*> beqzl at,000000d0 <text_label\+0xd0>
+[ ]*d0: R_MIPS_PC16 external_label
+0+00d4 <[^>]*> nop
+0+00d8 <[^>]*> slt at,a1,a0
+0+00dc <[^>]*> bnezl at,000000dc <text_label\+0xdc>
+[ ]*dc: R_MIPS_PC16 external_label
...
diff --git a/gas/testsuite/gas/mips/bge.s b/gas/testsuite/gas/mips/bge.s
index 405fd82..4b4e58f 100644
--- a/gas/testsuite/gas/mips/bge.s
+++ b/gas/testsuite/gas/mips/bge.s
@@ -24,6 +24,12 @@ text_label:
bgel $4,$5,text_label
bgtl $4,$5,text_label
+# Branch to an external label.
+ bge $4,$5,external_label
+ bgt $4,$5,external_label
+ bgel $4,$5,external_label
+ bgtl $4,$5,external_label
+
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
nop
diff --git a/gas/testsuite/gas/mips/bgeu.d b/gas/testsuite/gas/mips/bgeu.d
index 8f2bfa7..49d1130 100644
--- a/gas/testsuite/gas/mips/bgeu.d
+++ b/gas/testsuite/gas/mips/bgeu.d
@@ -44,4 +44,20 @@ Disassembly of section .text:
0+008c <[^>]*> nop
0+0090 <[^>]*> sltu at,a1,a0
0+0094 <[^>]*> bnezl at,0+0000 <text_label>
+0+0098 <[^>]*> nop
+0+009c <[^>]*> sltu at,a0,a1
+0+00a0 <[^>]*> beqz at,000000a0 <text_label\+0xa0>
+[ ]*a0: R_MIPS_PC16 external_label
+0+00a4 <[^>]*> nop
+0+00a8 <[^>]*> sltu at,a1,a0
+0+00ac <[^>]*> bnez at,000000ac <text_label\+0xac>
+[ ]*ac: R_MIPS_PC16 external_label
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> sltu at,a0,a1
+0+00b8 <[^>]*> beqzl at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> sltu at,a1,a0
+0+00c4 <[^>]*> bnezl at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
...
diff --git a/gas/testsuite/gas/mips/bgeu.s b/gas/testsuite/gas/mips/bgeu.s
index 1c37f96..cccd584 100644
--- a/gas/testsuite/gas/mips/bgeu.s
+++ b/gas/testsuite/gas/mips/bgeu.s
@@ -22,6 +22,12 @@ text_label:
bgeul $4,$5,text_label
bgtul $4,$5,text_label
+# Branch to an external label.
+ bgeu $4,$5,external_label
+ bgtu $4,$5,external_label
+ bgeul $4,$5,external_label
+ bgtul $4,$5,external_label
+
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
nop
diff --git a/gas/testsuite/gas/mips/blt.d b/gas/testsuite/gas/mips/blt.d
index 3423cdf..d7670c0 100644
--- a/gas/testsuite/gas/mips/blt.d
+++ b/gas/testsuite/gas/mips/blt.d
@@ -50,4 +50,20 @@ Disassembly of section .text:
0+00a4 <[^>]*> nop
0+00a8 <[^>]*> slt at,a1,a0
0+00ac <[^>]*> beqzl at,0+0000 <text_label>
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> slt at,a0,a1
+0+00b8 <[^>]*> bnez at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> slt at,a1,a0
+0+00c4 <[^>]*> beqz at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
+0+00c8 <[^>]*> nop
+0+00cc <[^>]*> slt at,a0,a1
+0+00d0 <[^>]*> bnezl at,000000d0 <text_label\+0xd0>
+[ ]*d0: R_MIPS_PC16 external_label
+0+00d4 <[^>]*> nop
+0+00d8 <[^>]*> slt at,a1,a0
+0+00dc <[^>]*> beqzl at,000000dc <text_label\+0xdc>
+[ ]*dc: R_MIPS_PC16 external_label
...
diff --git a/gas/testsuite/gas/mips/blt.s b/gas/testsuite/gas/mips/blt.s
index 0003056..9b2ed08 100644
--- a/gas/testsuite/gas/mips/blt.s
+++ b/gas/testsuite/gas/mips/blt.s
@@ -24,6 +24,12 @@ text_label:
bltl $4,$5,text_label
blel $4,$5,text_label
+# Branch to an external label.
+ blt $4,$5,external_label
+ ble $4,$5,external_label
+ bltl $4,$5,external_label
+ blel $4,$5,external_label
+
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
nop
diff --git a/gas/testsuite/gas/mips/bltu.d b/gas/testsuite/gas/mips/bltu.d
index 63dcd17..0e2a644 100644
--- a/gas/testsuite/gas/mips/bltu.d
+++ b/gas/testsuite/gas/mips/bltu.d
@@ -44,4 +44,20 @@ Disassembly of section .text:
0+008c <[^>]*> nop
0+0090 <[^>]*> sltu at,a1,a0
0+0094 <[^>]*> beqzl at,0+0000 <text_label>
+0+0098 <[^>]*> nop
+0+009c <[^>]*> sltu at,a0,a1
+0+00a0 <[^>]*> bnez at,000000a0 <text_label\+0xa0>
+[ ]*a0: R_MIPS_PC16 external_label
+0+00a4 <[^>]*> nop
+0+00a8 <[^>]*> sltu at,a1,a0
+0+00ac <[^>]*> beqz at,000000ac <text_label\+0xac>
+[ ]*ac: R_MIPS_PC16 external_label
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> sltu at,a0,a1
+0+00b8 <[^>]*> bnezl at,000000b8 <text_label\+0xb8>
+[ ]*b8: R_MIPS_PC16 external_label
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> sltu at,a1,a0
+0+00c4 <[^>]*> beqzl at,000000c4 <text_label\+0xc4>
+[ ]*c4: R_MIPS_PC16 external_label
...
diff --git a/gas/testsuite/gas/mips/bltu.s b/gas/testsuite/gas/mips/bltu.s
index 44b1ae6..602b7b2 100644
--- a/gas/testsuite/gas/mips/bltu.s
+++ b/gas/testsuite/gas/mips/bltu.s
@@ -22,6 +22,12 @@ text_label:
bltul $4,$5,text_label
bleul $4,$5,text_label
+# Branch to an external label.
+ bltu $4,$5,external_label
+ bleu $4,$5,external_label
+ bltul $4,$5,external_label
+ bleul $4,$5,external_label
+
# Round to a 16 byte boundary, for ease in testing multiple targets.
nop
nop