From 0a922ca443b42f52e83f54295e24e78997c75f40 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 15 Jan 2000 04:46:00 +0000 Subject: [PATCH] Add jmp and call tests to prevent intel mode lossage creeping in again. --- gas/testsuite/ChangeLog | 4 +++ gas/testsuite/gas/i386/general.l | 55 ++++++++++++++++++++++++++++++++++++++-- gas/testsuite/gas/i386/general.s | 30 ++++++++++++++++++++++ 3 files changed, 87 insertions(+), 2 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e2887d95a..c0122b89e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-01-15 Alan Modra + + * gas/i386/general.{s,l}: Add jmp and call tests. + Tue Nov 30 23:02:01 1999 Jeffrey A Law (law@cygnus.com) * gas/mn10300/{am33.s, am33_2.s, am33_3.s}: New test files. diff --git a/gas/testsuite/gas/i386/general.l b/gas/testsuite/gas/i386/general.l index e07e7664c..c080f90c4 100644 --- a/gas/testsuite/gas/i386/general.l +++ b/gas/testsuite/gas/i386/general.l @@ -25,6 +25,16 @@ .*:100: Warning:.* .*:101: Warning:.* .*:135: Warning:.* +.*:163: Warning:.* +.*:165: Warning:.* +.*:167: Warning:.* +.*:169: Warning:.* +.*:171: Warning:.* +.*:177: Warning:.* +.*:179: Warning:.* +.*:181: Warning:.* +.*:183: Warning:.* +.*:185: Warning:.* 1 .psize 0 2 .text 3 # test various segment reg insns @@ -209,5 +219,46 @@ 156 0160 67668984 248C0000 movl %eax,140\(%esp\) 156 00 157 - 158 # Force a good alignment. - 159 0169 00000000 000000[ ]*.p2align 4,0 + 158 .code32 + 159 .extern xxx + 160 0169 EB98 jmp 1b + 161 016b E9FCFFFF FF jmp xxx + 162 0170 FF250000 0000 jmp \*xxx + 163 0176 FF250000 0000 jmp xxx\(,1\) +.*Warning:.* + 164 017c FFE7 jmp \*%edi + 165 017e FFE7 jmp %edi +.*Warning:.* + 166 0180 FF27 jmp \*\(%edi\) + 167 0182 FF27 jmp \(%edi\) +.*Warning:.* + 168 0184 FF2CBD00 000000 ljmp \*xxx\(,%edi,4\) + 169 018b FF2CBD00 000000 ljmp xxx\(,%edi,4\) +.*Warning:.* + 170 0192 FF2D0000 0000 ljmp \*xxx + 171 0198 FF2D0000 0000 ljmp xxx\(,1\) +.*Warning:.* + 172 019e EA000000 003412 ljmp \$0x1234,\$xxx + 173 + 174 01a5 E859FFFF FF call 1b + 175 01aa E8FCFFFF FF call xxx + 176 01af FF150000 0000 call \*xxx + 177 01b5 FF150000 0000 call xxx\(,1\) +.*Warning:.* + 178 01bb FFD7 call \*%edi + 179 01bd FFD7 call %edi +.*Warning:.* + 180 01bf FF17 call \*\(%edi\) + 181 01c1 FF17 call \(%edi\) +.*Warning:.* + 182 01c3 FF1CBD00 000000 lcall \*xxx\(,%edi,4\) + 183 01ca FF1CBD00 000000 lcall xxx\(,%edi,4\) +.*Warning:.* + 184 01d1 FF1D0000 0000 lcall \*xxx + 185 01d7 FF1D0000 0000 lcall xxx\(,1\) +.*Warning:.* + 186 01dd 9A000000 003412 lcall \$0x1234,\$xxx + 187 + 188 # Force a good alignment. + 189 01e4 00000000 00000000 .p2align 4,0 + 189 00000000 diff --git a/gas/testsuite/gas/i386/general.s b/gas/testsuite/gas/i386/general.s index b96b68d35..e59f28c14 100644 --- a/gas/testsuite/gas/i386/general.s +++ b/gas/testsuite/gas/i386/general.s @@ -155,5 +155,35 @@ leal -1760(%ebp),%ebx movl %eax,140(%esp) +.code32 +.extern xxx + jmp 1b + jmp xxx + jmp *xxx + jmp xxx(,1) + jmp *%edi + jmp %edi + jmp *(%edi) + jmp (%edi) + ljmp *xxx(,%edi,4) + ljmp xxx(,%edi,4) + 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,4) + lcall xxx(,%edi,4) + lcall *xxx + lcall xxx(,1) + lcall $0x1234,$xxx + # Force a good alignment. .p2align 4,0 -- 2.11.4.GIT