summaryrefslogtreecommitdiff
path: root/test/MC/X86
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-01-08 12:57:45 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-01-08 12:57:45 +0000
commit1a19e262765168d7c944507171ca98f37dc08c7e (patch)
tree9d7d85057733e08e2c8cd951510a2be2ec528c9f /test/MC/X86
parenta493812047cace1d21c7c188ce226558faa62fa8 (diff)
downloadllvm-1a19e262765168d7c944507171ca98f37dc08c7e.tar.gz
llvm-1a19e262765168d7c944507171ca98f37dc08c7e.tar.bz2
llvm-1a19e262765168d7c944507171ca98f37dc08c7e.tar.xz
[x86] Add PUSHA16,POPA16 instructions, and fix aliases for 16-bit mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/X86')
-rw-r--r--test/MC/X86/x86-16.s49
-rw-r--r--test/MC/X86/x86-32.s12
2 files changed, 59 insertions, 2 deletions
diff --git a/test/MC/X86/x86-16.s b/test/MC/X86/x86-16.s
index d160d46920..75611bfb6f 100644
--- a/test/MC/X86/x86-16.s
+++ b/test/MC/X86/x86-16.s
@@ -62,8 +62,12 @@ int $255
// CHECK: int $255
// CHECK: encoding: [0xcd,0xff]
+// CHECK: pushfw # encoding: [0x9c]
+ pushf
// CHECK: pushfl # encoding: [0x66,0x9c]
pushfl
+// CHECK: popfw # encoding: [0x9d]
+ popf
// CHECK: popfl # encoding: [0x66,0x9d]
popfl
@@ -311,6 +315,22 @@ cmovnae %bx,%bx
// CHECK: encoding: [0x9b]
fwait
+// CHECK: pusha
+// CHECK: encoding: [0x60]
+ pusha
+
+// CHECK: popa
+// CHECK: encoding: [0x61]
+ popa
+
+// CHECK: pushaw
+// CHECK: encoding: [0x60]
+ pushaw
+
+// CHECK: popaw
+// CHECK: encoding: [0x61]
+ popaw
+
// CHECK: pushal
// CHECK: encoding: [0x66,0x60]
pushal
@@ -341,6 +361,25 @@ testl -24(%ebp), %ecx
// CHECK: testl -24(%ebp), %ecx
+push %cs
+// CHECK: pushw %cs
+// CHECK: encoding: [0x0e]
+push %ds
+// CHECK: pushw %ds
+// CHECK: encoding: [0x1e]
+push %ss
+// CHECK: pushw %ss
+// CHECK: encoding: [0x16]
+push %es
+// CHECK: pushw %es
+// CHECK: encoding: [0x06]
+push %fs
+// CHECK: pushw %fs
+// CHECK: encoding: [0x0f,0xa0]
+push %gs
+// CHECK: pushw %gs
+// CHECK: encoding: [0x0f,0xa8]
+
pushw %cs
// CHECK: pushw %cs
// CHECK: encoding: [0x0e]
@@ -379,6 +418,16 @@ pushl %gs
// CHECK: pushl %gs
// CHECK: encoding: [0x66,0x0f,0xa8]
+pop %ss
+// CHECK: popw %ss
+// CHECK: encoding: [0x17]
+pop %ds
+// CHECK: popw %ds
+// CHECK: encoding: [0x1f]
+pop %es
+// CHECK: popw %es
+// CHECK: encoding: [0x07]
+
popl %ss
// CHECK: popl %ss
// CHECK: encoding: [0x66,0x17]
diff --git a/test/MC/X86/x86-32.s b/test/MC/X86/x86-32.s
index 99136bd19c..fa88f28712 100644
--- a/test/MC/X86/x86-32.s
+++ b/test/MC/X86/x86-32.s
@@ -442,14 +442,22 @@ cmovnae %bx,%bx
// FIXME: This is a correct bug poor encoding: Use 65 a1 7c 00 00 00
movl %gs:124, %eax
-// CHECK: pusha
+// CHECK: pushal
// CHECK: encoding: [0x60]
pusha
-// CHECK: popa
+// CHECK: popal
// CHECK: encoding: [0x61]
popa
+// CHECK: pushaw
+// CHECK: encoding: [0x66,0x60]
+ pushaw
+
+// CHECK: popaw
+// CHECK: encoding: [0x66,0x61]
+ popaw
+
// CHECK: pushal
// CHECK: encoding: [0x60]
pushal