diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-09-08 22:13:08 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-09-08 22:13:08 +0000 |
| commit | 8ead237758f841cab43db10dc07ffca4cdc7e52f (patch) | |
| tree | a6b0fd2c2bfd6601dd19ef7be4774c74444402fe /llvm/test | |
| parent | 09799af62e61d1ad5d0f311b41a9648395cf3ffd (diff) | |
| download | bcm5719-llvm-8ead237758f841cab43db10dc07ffca4cdc7e52f.tar.gz bcm5719-llvm-8ead237758f841cab43db10dc07ffca4cdc7e52f.zip | |
fix bugs in push/pop segment support, rdar://8407242
llvm-svn: 113422
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/AsmParser/X86/x86_32-new-encoder.s | 49 | ||||
| -rw-r--r-- | llvm/test/MC/AsmParser/X86/x86_64-new-encoder.s | 33 |
2 files changed, 82 insertions, 0 deletions
diff --git a/llvm/test/MC/AsmParser/X86/x86_32-new-encoder.s b/llvm/test/MC/AsmParser/X86/x86_32-new-encoder.s index 6d9d7ed4074..70d4b40c78a 100644 --- a/llvm/test/MC/AsmParser/X86/x86_32-new-encoder.s +++ b/llvm/test/MC/AsmParser/X86/x86_32-new-encoder.s @@ -459,3 +459,52 @@ testl %ecx, -24(%ebp) testl -24(%ebp), %ecx // CHECK: testl -24(%ebp), %ecx + +// rdar://8407242 +push %cs +// CHECK: pushl %cs +// CHECK: encoding: [0x0e] +push %ds +// CHECK: pushl %ds +// CHECK: encoding: [0x1e] +push %ss +// CHECK: pushl %ss +// CHECK: encoding: [0x16] +push %es +// CHECK: pushl %es +// CHECK: encoding: [0x06] +push %fs +// CHECK: pushl %fs +// CHECK: encoding: [0x0f,0xa0] +push %gs +// CHECK: pushl %gs +// CHECK: encoding: [0x0f,0xa8] + +pushw %cs +// CHECK: pushw %cs +// CHECK: encoding: [0x66,0x0e] +pushw %ds +// CHECK: pushw %ds +// CHECK: encoding: [0x66,0x1e] +pushw %ss +// CHECK: pushw %ss +// CHECK: encoding: [0x66,0x16] +pushw %es +// CHECK: pushw %es +// CHECK: encoding: [0x66,0x06] +pushw %fs +// CHECK: pushw %fs +// CHECK: encoding: [0x66,0x0f,0xa0] +pushw %gs +// CHECK: pushw %gs +// CHECK: encoding: [0x66,0x0f,0xa8] + +pop %ss +// CHECK: popl %ss +// CHECK: encoding: [0x17] +pop %ds +// CHECK: popl %ds +// CHECK: encoding: [0x1f] +pop %es +// CHECK: popl %es +// CHECK: encoding: [0x07] diff --git a/llvm/test/MC/AsmParser/X86/x86_64-new-encoder.s b/llvm/test/MC/AsmParser/X86/x86_64-new-encoder.s index 6f5f8fae1d0..e23c22478ca 100644 --- a/llvm/test/MC/AsmParser/X86/x86_64-new-encoder.s +++ b/llvm/test/MC/AsmParser/X86/x86_64-new-encoder.s @@ -211,3 +211,36 @@ sysretl sysretq // CHECK: sysretq // CHECK: encoding: [0x48,0x0f,0x07] + +// rdar://8407242 +push %fs +// CHECK: pushq %fs +// CHECK: encoding: [0x0f,0xa0] +push %gs +// CHECK: pushq %gs +// CHECK: encoding: [0x0f,0xa8] + +pushw %fs +// CHECK: pushw %fs +// CHECK: encoding: [0x66,0x0f,0xa0] +pushw %gs +// CHECK: pushw %gs +// CHECK: encoding: [0x66,0x0f,0xa8] + + +pop %fs +// CHECK: popq %fs +// CHECK: encoding: [0x0f,0xa1] +pop %gs +// CHECK: popq %gs +// CHECK: encoding: [0x0f,0xa9] + +popw %fs +// CHECK: popw %fs +// CHECK: encoding: [0x66,0x0f,0xa1] +popw %gs +// CHECK: popw %gs +// CHECK: encoding: [0x66,0x0f,0xa9] + + + |

