aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2019-12-04 10:40:40 +0100
committerJan Beulich <jbeulich@suse.com>2019-12-04 10:40:40 +0100
commit13e600d0f5601e354f1f3ed896db35845a682fee (patch)
tree0a66e700226c227eecf509ca406a3586b02a9e35 /gas/testsuite
parent3036c8991964674ca2407c543645d841ad431267 (diff)
downloadgdb-13e600d0f5601e354f1f3ed896db35845a682fee.zip
gdb-13e600d0f5601e354f1f3ed896db35845a682fee.tar.gz
gdb-13e600d0f5601e354f1f3ed896db35845a682fee.tar.bz2
x86: make sure all PUSH/POP honor DefaultSize
While segment registers are registers, their use doesn't allow sizing of insns without suffix / explicit operand size specifier. Prevent PUSH and POP of segment registers from entering that path, instead allowing them to observe the stackop_size setting just like other PUSH/POP and alike do.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/i386/general.l12
-rw-r--r--gas/testsuite/gas/i386/general.s4
2 files changed, 16 insertions, 0 deletions
diff --git a/gas/testsuite/gas/i386/general.l b/gas/testsuite/gas/i386/general.l
index d5f74d1..acd4440 100644
--- a/gas/testsuite/gas/i386/general.l
+++ b/gas/testsuite/gas/i386/general.l
@@ -32,6 +32,10 @@
.*:144: Warning:.*
.*:178: Warning:.*
.*:224: Warning:.*
+.*:233: Warning:.*
+.*:234: Warning:.*
+.*:238: Warning:.*
+.*:239: Warning:.*
1 .psize 0
2 .text
3 #test jumps and calls
@@ -298,9 +302,17 @@
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+666A00[ ]+push \$0
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66683412 0000[ ]+push \$0x1234
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66FF37[ ]+push \(%bx\)
+[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6606[ ]+push %es
+.*Warning:.*32-bit.*push.*
+[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+660FA0[ ]+push %fs
+.*Warning:.*32-bit.*push.*
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6660[ ]+pusha
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+669C[ ]+pushf
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+668F07[ ]+pop \(%bx\)
+[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6607[ ]+pop %es
+.*Warning:.*32-bit.*pop.*
+[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+660FA1[ ]+pop %fs
+.*Warning:.*32-bit.*pop.*
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+6661[ ]+popa
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+669D[ ]+popf
[ ]*[1-9][0-9]*[ ]+[0-9a-f]*[ ]+66C3[ ]+ret
diff --git a/gas/testsuite/gas/i386/general.s b/gas/testsuite/gas/i386/general.s
index add14fd..39bbfe3 100644
--- a/gas/testsuite/gas/i386/general.s
+++ b/gas/testsuite/gas/i386/general.s
@@ -230,9 +230,13 @@
push $0
push $0x1234
push (%bx)
+ push %es
+ push %fs
pusha
pushf
pop (%bx)
+ pop %es
+ pop %fs
popa
popf
ret