aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-01-21 10:18:33 +0000
committerAlan Modra <amodra@gmail.com>2000-01-21 10:18:33 +0000
commita3d1c52b07871436240f8f7664ef297f7c0579db (patch)
tree5e78e7e8283b534fc8e07b8b10fe88f2f4ea7857 /gas/testsuite
parent06b53c1bff55150114af371602cb278d5325cf4e (diff)
downloadgdb-a3d1c52b07871436240f8f7664ef297f7c0579db.zip
gdb-a3d1c52b07871436240f8f7664ef297f7c0579db.tar.gz
gdb-a3d1c52b07871436240f8f7664ef297f7c0579db.tar.bz2
gas/testsuite/ChangeLog
* gas/i386/general.{s,l}: Move 16 bit jmp and call tests from here * gas/i386/jump16.{s,d}: To here. * gas/i386/jump.{s,d}: New files. Duplicate 32 bit jmp and call tests in general.s so that objdump is exercised. * gas/i386/i386.exp: Call new tests.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog9
-rw-r--r--gas/testsuite/gas/i386/general.l156
-rw-r--r--gas/testsuite/gas/i386/general.s58
-rw-r--r--gas/testsuite/gas/i386/i386.exp6
-rw-r--r--gas/testsuite/gas/i386/jump.d26
-rw-r--r--gas/testsuite/gas/i386/jump.s24
-rw-r--r--gas/testsuite/gas/i386/jump16.d40
-rw-r--r--gas/testsuite/gas/i386/jump16.s43
8 files changed, 175 insertions, 187 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index c6c1e82..e631626 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2000-01-21 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * gas/i386/general.{s,l}: Move 16 bit jmp and call tests from here
+ * gas/i386/jump16.{s,d}: To here.
+ * gas/i386/jump.{s,d}: New files. Duplicate 32 bit jmp and call
+ tests in general.s so that objdump is exercised.
+
+ * gas/i386/i386.exp: Call new tests.
+
2000-01-15 Alan Modra <alan@spri.levels.unisa.edu.au>
* gas/i386/general.{s,l}: Add jmp and call tests for .code16gcc,
diff --git a/gas/testsuite/gas/i386/general.l b/gas/testsuite/gas/i386/general.l
index 4e0fb0a..bbb59ef 100644
--- a/gas/testsuite/gas/i386/general.l
+++ b/gas/testsuite/gas/i386/general.l
@@ -35,26 +35,6 @@
.*:180: Warning:.*
.*:182: Warning:.*
.*:184: Warning:.*
-.*:191: Warning:.*
-.*:193: Warning:.*
-.*:195: Warning:.*
-.*:197: Warning:.*
-.*:199: Warning:.*
-.*:205: Warning:.*
-.*:207: Warning:.*
-.*:209: Warning:.*
-.*:211: Warning:.*
-.*:213: Warning:.*
-.*:220: Warning:.*
-.*:222: Warning:.*
-.*:224: Warning:.*
-.*:226: Warning:.*
-.*:228: Warning:.*
-.*:234: Warning:.*
-.*:236: Warning:.*
-.*:238: Warning:.*
-.*:240: Warning:.*
-.*:242: Warning:.*
1 .psize 0
2 .text
3 # test various segment reg insns
@@ -239,123 +219,45 @@
156 0160 67668984 248C0000 movl %eax,140\(%esp\)
156 00
157
- 158 .extern xxx
+ 158 .code32
159 0169 EB98 jmp 1b
- 160 016b E9FEFF jmp xxx
- 161 016e FF260000 jmp \*xxx
- 162 0172 FF260000 jmp xxx\(,1\)
+ 160 016b E9FCFFFF FF jmp xxx
+ 161 0170 FF250000 0000 jmp \*xxx
+ 162 0176 FF250000 0000 jmp xxx\(,1\)
.*Warning:.*
- 163 0176 66FFE7 jmp \*%edi
- 164 0179 66FFE7 jmp %edi
+ 163 017c FFE7 jmp \*%edi
+ 164 017e FFE7 jmp %edi
.*Warning:.*
- 165 017c 67FF27 jmp \*\(%edi\)
- 166 017f 67FF27 jmp \(%edi\)
+ 165 0180 FF27 jmp \*\(%edi\)
+ 166 0182 FF27 jmp \(%edi\)
.*Warning:.*
- 167 0182 67FFAF00 000000 ljmp \*xxx\(%edi\)
- 168 0189 67FFAF00 000000 ljmp xxx\(%edi\)
+ 167 0184 FF2CBD00 000000 ljmp \*xxx\(,%edi,4\)
+ 168 018b FF2CBD00 000000 ljmp xxx\(,%edi,4\)
.*Warning:.*
- 169 0190 FF2E0000 ljmp \*xxx
- 170 0194 FF2E0000 ljmp xxx\(,1\)
+ 169 0192 FF2D0000 0000 ljmp \*xxx
+ 170 0198 FF2D0000 0000 ljmp xxx\(,1\)
.*Warning:.*
- 171 0198 EA000034 12 ljmp \$0x1234,\$xxx
+ 171 019e EA000000 003412 ljmp \$0x1234,\$xxx
172
- 173 019d 66E860FF FFFF call 1b
- 174 01a3 66E8FCFF FFFF call xxx
- 175 01a9 66FF1600 00 call \*xxx
- 176 01ae 66FF1600 00 call xxx\(,1\)
+ 173 01a5 E859FFFF FF call 1b
+ 174 01aa E8FCFFFF FF call xxx
+ 175 01af FF150000 0000 call \*xxx
+ 176 01b5 FF150000 0000 call xxx\(,1\)
.*Warning:.*
- 177 01b3 66FFD7 call \*%edi
- 178 01b6 66FFD7 call %edi
+ 177 01bb FFD7 call \*%edi
+ 178 01bd FFD7 call %edi
.*Warning:.*
- 179 01b9 6766FF17 call \*\(%edi\)
- 180 01bd 6766FF17 call \(%edi\)
+ 179 01bf FF17 call \*\(%edi\)
+ 180 01c1 FF17 call \(%edi\)
.*Warning:.*
- 181 01c1 6766FF9F 00000000 lcall \*xxx\(%edi\)
- 182 01c9 6766FF9F 00000000 lcall xxx\(%edi\)
+ 181 01c3 FF1CBD00 000000 lcall \*xxx\(,%edi,4\)
+ 182 01ca FF1CBD00 000000 lcall xxx\(,%edi,4\)
.*Warning:.*
- 183 01d1 66FF1E00 00 lcall \*xxx
- 184 01d6 66FF1E00 00 lcall xxx\(,1\)
+ 183 01d1 FF1D0000 0000 lcall \*xxx
+ 184 01d7 FF1D0000 0000 lcall xxx\(,1\)
.*Warning:.*
- 185 01db 669A0000 00003412 lcall \$0x1234,\$xxx
+ 185 01dd 9A000000 003412 lcall \$0x1234,\$xxx
186
- 187 .code16
- 188 01e3 E91DFF jmp 1b
- 189 01e6 E9FEFF jmp xxx
- 190 01e9 FF260000 jmp \*xxx
- 191 01ed FF260000 jmp xxx\(,1\)
-.*Warning:.*
- 192 01f1 FFE7 jmp \*%di
- 193 01f3 FFE7 jmp %di
-.*Warning:.*
- 194 01f5 FF25 jmp \*\(%di\)
- 195 01f7 FF25 jmp \(%di\)
-.*Warning:.*
- 196 01f9 FFAD0000 ljmp \*xxx\(%di\)
- 197 01fd FFAD0000 ljmp xxx\(%di\)
-.*Warning:.*
- 198 0201 FF2E0000 ljmp \*xxx
- 199 0205 FF2E0000 ljmp xxx\(,1\)
-.*Warning:.*
- 200 0209 EA000034 12 ljmp \$0x1234,\$xxx
- 201
- 202 020e E8F2FE call 1b
- 203 0211 E8FEFF call xxx
- 204 0214 FF160000 call \*xxx
- 205 0218 FF160000 call xxx\(,1\)
-.*Warning:.*
- 206 021c FFD7 call \*%di
- 207 021e FFD7 call %di
-.*Warning:.*
- 208 0220 FF15 call \*\(%di\)
- 209 0222 FF15 call \(%di\)
-.*Warning:.*
- 210 0224 FF9D0000 lcall \*xxx\(%di\)
- 211 0228 FF9D0000 lcall xxx\(%di\)
-.*Warning:.*
- 212 022c FF1E0000 lcall \*xxx
- 213 0230 FF1E0000 lcall xxx\(,1\)
-.*Warning:.*
- 214 0234 9A000034 12 lcall \$0x1234,\$xxx
- 215
- 216 .code32
- 217 0239 E9C5FEFF FF jmp 1b
- 218 023e E9FCFFFF FF jmp xxx
- 219 0243 FF250000 0000 jmp \*xxx
- 220 0249 FF250000 0000 jmp xxx\(,1\)
-.*Warning:.*
- 221 024f FFE7 jmp \*%edi
- 222 0251 FFE7 jmp %edi
-.*Warning:.*
- 223 0253 FF27 jmp \*\(%edi\)
- 224 0255 FF27 jmp \(%edi\)
-.*Warning:.*
- 225 0257 FF2CBD00 000000 ljmp \*xxx\(,%edi,4\)
- 226 025e FF2CBD00 000000 ljmp xxx\(,%edi,4\)
-.*Warning:.*
- 227 0265 FF2D0000 0000 ljmp \*xxx
- 228 026b FF2D0000 0000 ljmp xxx\(,1\)
-.*Warning:.*
- 229 0271 EA000000 003412 ljmp \$0x1234,\$xxx
- 230
- 231 0278 E886FEFF FF call 1b
- 232 027d E8FCFFFF FF call xxx
- 233 0282 FF150000 0000 call \*xxx
- 234 0288 FF150000 0000 call xxx\(,1\)
-.*Warning:.*
- 235 028e FFD7 call \*%edi
- 236 0290 FFD7 call %edi
-.*Warning:.*
- 237 0292 FF17 call \*\(%edi\)
- 238 0294 FF17 call \(%edi\)
-.*Warning:.*
- 239 0296 FF1CBD00 000000 lcall \*xxx\(,%edi,4\)
- 240 029d FF1CBD00 000000 lcall xxx\(,%edi,4\)
-.*Warning:.*
- 241 02a4 FF1D0000 0000 lcall \*xxx
- 242 02aa FF1D0000 0000 lcall xxx\(,1\)
-.*Warning:.*
- 243 02b0 9A000000 003412 lcall \$0x1234,\$xxx
- 244
- 245 # Force a good alignment.
- 246 02b7 00000000 00000000 .p2align 4,0
- 246 00
+ 187 # Force a good alignment.
+ 188 01e4 00000000 00000000 .p2align 4,0
+ 188 00000000
diff --git a/gas/testsuite/gas/i386/general.s b/gas/testsuite/gas/i386/general.s
index d8be937..c794157 100644
--- a/gas/testsuite/gas/i386/general.s
+++ b/gas/testsuite/gas/i386/general.s
@@ -155,64 +155,6 @@
leal -1760(%ebp),%ebx
movl %eax,140(%esp)
-.extern xxx
- jmp 1b
- jmp xxx
- jmp *xxx
- jmp xxx(,1)
- jmp *%edi
- jmp %edi
- jmp *(%edi)
- jmp (%edi)
- ljmp *xxx(%edi)
- ljmp xxx(%edi)
- ljmp *xxx
- ljmp xxx(,1)
- ljmp $0x1234,$xxx
-
- call 1b
- call xxx
- call *xxx
- call xxx(,1)
- call *%edi
- call %edi
- call *(%edi)
- call (%edi)
- lcall *xxx(%edi)
- lcall xxx(%edi)
- lcall *xxx
- lcall xxx(,1)
- lcall $0x1234,$xxx
-
-.code16
- jmp 1b
- jmp xxx
- jmp *xxx
- jmp xxx(,1)
- jmp *%di
- jmp %di
- jmp *(%di)
- jmp (%di)
- ljmp *xxx(%di)
- ljmp xxx(%di)
- ljmp *xxx
- ljmp xxx(,1)
- ljmp $0x1234,$xxx
-
- call 1b
- call xxx
- call *xxx
- call xxx(,1)
- call *%di
- call %di
- call *(%di)
- call (%di)
- lcall *xxx(%di)
- lcall xxx(%di)
- lcall *xxx
- lcall xxx(,1)
- lcall $0x1234,$xxx
-
.code32
jmp 1b
jmp xxx
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 9401136..a431bb6 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -26,11 +26,13 @@ if [istarget "i*86-*-*"] then {
run_dump_test "prefix"
run_dump_test "amd"
run_dump_test "katmai"
+ run_dump_test "jump"
- # The reloc and white tests require support for 8 and 16 bit
- # relocs, so we only run them for ELF and COFF targets.
+ # These tests require support for 8 and 16 bit relocs,
+ # so we only run them for ELF and COFF targets.
if {[istarget "*-*-elf*"] || [istarget "*-*-linux*"] || [istarget "*-*-coff*"]} then {
run_dump_test "reloc"
+ run_dump_test "jump16"
run_list_test "white" "-al --listing-lhs-width=3"
}
}
diff --git a/gas/testsuite/gas/i386/jump.d b/gas/testsuite/gas/i386/jump.d
new file mode 100644
index 0000000..90e893e
--- /dev/null
+++ b/gas/testsuite/gas/i386/jump.d
@@ -0,0 +1,26 @@
+#name: i386 jump
+#objdump: -drw
+
+.*: +file format .*i386.*
+
+Disassembly of section .text:
+
+0+000 <.text>:
+ 0: eb fe [ ]*jmp (0x0|0 <.text>)
+ 2: e9 (fc|f9) ff ff ff [ ]*jmp (0x3|0 <.text>) 3: (R_386_PC)?(DISP)?32 xxx
+ 7: ff 25 00 00 00 00 [ ]*jmp \*0x0 9: (R_386_)?(dir)?32 xxx
+ d: ff e7 [ ]*jmp \*%edi
+ f: ff 27 [ ]*jmp \*\(%edi\)
+ 11: ff 2c bd 00 00 00 00 [ ]*ljmp \*0x0\(,%edi,4\) 14: (R_386_)?(dir)?32 xxx
+ 18: ff 2d 00 00 00 00 [ ]*ljmp \*0x0 1a: (R_386_)?(dir)?32 xxx
+ 1e: ea 00 00 00 00 34 12 [ ]*ljmp \$0x1234,\$0x0 1f: (R_386_)?(dir)?32 xxx
+ 25: e8 d6 ff ff ff [ ]*call (0x0|0 <.text>)
+ 2a: e8 (fc|d1) ff ff ff [ ]*call (0x2b|0 <.text>) 2b: (R_386_PC)?(DISP)?32 xxx
+ 2f: ff 15 00 00 00 00 [ ]*call \*0x0 31: (R_386_)?(dir)?32 xxx
+ 35: ff d7 [ ]*call \*%edi
+ 37: ff 17 [ ]*call \*\(%edi\)
+ 39: ff 1c bd 00 00 00 00 [ ]*lcall \*0x0\(,%edi,4\) 3c: (R_386_)?(dir)?32 xxx
+ 40: ff 1d 00 00 00 00 [ ]*lcall \*0x0 42: (R_386_)?(dir)?32 xxx
+ 46: 9a 00 00 00 00 34 12 [ ]*lcall \$0x1234,\$0x0 47: (R_386_)?(dir)?32 xxx
+ 4d:.*
+.*
diff --git a/gas/testsuite/gas/i386/jump.s b/gas/testsuite/gas/i386/jump.s
new file mode 100644
index 0000000..1f11cd3
--- /dev/null
+++ b/gas/testsuite/gas/i386/jump.s
@@ -0,0 +1,24 @@
+.psize 0
+.text
+.extern xxx
+
+1: jmp 1b
+ jmp xxx
+ jmp *xxx
+ jmp *%edi
+ jmp *(%edi)
+ ljmp *xxx(,%edi,4)
+ ljmp *xxx
+ ljmp $0x1234,$xxx
+
+ call 1b
+ call xxx
+ call *xxx
+ call *%edi
+ call *(%edi)
+ lcall *xxx(,%edi,4)
+ lcall *xxx
+ lcall $0x1234,$xxx
+
+ # Force a good alignment.
+ .p2align 4,0
diff --git a/gas/testsuite/gas/i386/jump16.d b/gas/testsuite/gas/i386/jump16.d
new file mode 100644
index 0000000..4513e4a
--- /dev/null
+++ b/gas/testsuite/gas/i386/jump16.d
@@ -0,0 +1,40 @@
+#name: i386 jump16
+#objdump: -drw -mi8086
+
+.*: file format .*i386.*
+
+Disassembly of section .text:
+
+0+000 <.text>:
+ 0: eb fe [ ]*jmp (0x0|0 <.text>)
+ 2: e9 (fe|fb) ff [ ]*jmp (0x3|0 <.text>) 3: (R_386_PC)?(DISP)?16 xxx
+ 5: ff 26 00 00 [ ]*jmp \*0 7: (R_386_)?(dir)?16 xxx
+ 9: 66 ff e7 [ ]*jmpl \*%edi
+ c: 67 ff 27 [ ]*addr32 jmp \*\(%edi\)
+ f: 67 ff af 00 00 00 00 [ ]*addr32 ljmp \*0x0\(%edi\) 12: (R_386_)?(dir)?32 xxx
+ 16: ff 2e 00 00 [ ]*ljmp \*0 18: (R_386_)?(dir)?16 xxx
+ 1a: ea 00 00 34 12 [ ]*ljmp \$0x1234,\$0x0 1b: (R_386_)?(dir)?16 xxx
+ 1f: 66 e8 db ff ff ff [ ]*calll (0x0|0 <.text>)
+ 25: 66 e8 (fc|d5) ff ff ff [ ]*calll (0x27|0 <.text>) 27: (R_386_PC)?(DISP)?32 xxx
+ 2b: 66 ff 16 00 00 [ ]*calll \*0 2e: (R_386_)?(dir)?16 xxx
+ 30: 66 ff d7 [ ]*calll \*%edi
+ 33: 67 66 ff 17 [ ]*addr32 calll \*\(%edi\)
+ 37: 67 66 ff 9f 00 00 00 00 [ ]*addr32 lcalll \*0x0\(%edi\) 3b: (R_386_)?(dir)?32 xxx
+ 3f: 66 ff 1e 00 00 [ ]*lcalll \*0 42: (R_386_)?(dir)?16 xxx
+ 44: 66 9a 00 00 00 00 34 12 [ ]*lcalll \$0x1234,\$0x0 46: (R_386_)?(dir)?32 xxx
+ 4c: eb b2 [ ]*jmp (0x0|0 <.text>)
+ 4e: ff 26 00 00 [ ]*jmp \*0 50: (R_386_)?(dir)?16 xxx
+ 52: ff e7 [ ]*jmp \*%di
+ 54: ff 25 [ ]*jmp \*\(%di\)
+ 56: ff ad 00 00 [ ]*ljmp \*0\(%di\) 58: (R_386_)?(dir)?16 xxx
+ 5a: ff 2e 00 00 [ ]*ljmp \*0 5c: (R_386_)?(dir)?16 xxx
+ 5e: ea 00 00 34 12 [ ]*ljmp \$0x1234,\$0x0 5f: (R_386_)?(dir)?16 xxx
+ 63: e8 9a ff [ ]*call (0x0|0 <.text>)
+ 66: e8 (fe|97) ff [ ]*call (0x67|0 <.text>) 67: (R_386_PC)?(DISP)?16 xxx
+ 69: ff 16 00 00 [ ]*call \*0 6b: (R_386_)?(dir)?16 xxx
+ 6d: ff d7 [ ]*call \*%di
+ 6f: ff 15 [ ]*call \*\(%di\)
+ 71: ff 9d 00 00 [ ]*lcall \*0\(%di\) 73: (R_386_)?(dir)?16 xxx
+ 75: ff 1e 00 00 [ ]*lcall \*0 77: (R_386_)?(dir)?16 xxx
+ 79: 9a 00 00 34 12 [ ]*lcall \$0x1234,\$0x0 7a: (R_386_)?(dir)?16 xxx
+ ...
diff --git a/gas/testsuite/gas/i386/jump16.s b/gas/testsuite/gas/i386/jump16.s
new file mode 100644
index 0000000..1eee242
--- /dev/null
+++ b/gas/testsuite/gas/i386/jump16.s
@@ -0,0 +1,43 @@
+.psize 0
+.text
+.extern xxx
+
+.code16gcc
+1: jmp 1b
+ jmp xxx
+ jmp *xxx
+ jmp *%edi
+ jmp *(%edi)
+ ljmp *xxx(%edi)
+ ljmp *xxx
+ ljmp $0x1234,$xxx
+
+ call 1b
+ call xxx
+ call *xxx
+ call *%edi
+ call *(%edi)
+ lcall *xxx(%edi)
+ lcall *xxx
+ lcall $0x1234,$xxx
+
+.code16
+ jmp 1b
+ jmp *xxx
+ jmp *%di
+ jmp *(%di)
+ ljmp *xxx(%di)
+ ljmp *xxx
+ ljmp $0x1234,$xxx
+
+ call 1b
+ call xxx
+ call *xxx
+ call *%di
+ call *(%di)
+ lcall *xxx(%di)
+ lcall *xxx
+ lcall $0x1234,$xxx
+
+ # Force a good alignment.
+ .p2align 4,0