1// RUN: llvm-mc -triple i386-unknown-unknown-unknown --show-encoding %s | FileCheck %s 2 3 .code16gcc 4 //CHECK: .code16 5 nop 6 //CHECK: nop # encoding: [0x90] 7 lodsb 8 //CHECK: lodsb (%esi), %al # encoding: [0x67,0xac] 9 lodsb (%si), %al 10 //CHECK: lodsb (%si), %al # encoding: [0xac] 11 lodsb (%esi), %al 12 //CHECK: lodsb (%esi), %al # encoding: [0x67,0xac] 13 lodsl %gs:(%esi) 14 //CHECK: lodsl %gs:(%esi), %eax # encoding: [0x66,0x65,0x67,0xad] 15 lods (%esi), %ax 16 //CHECK: lodsw (%esi), %ax # encoding: [0x67,0xad] 17 stosw 18 //CHECK: stosw %ax, %es:(%edi) # encoding: [0x67,0xab] 19 stos %eax, (%edi) 20 //CHECK: stosl %eax, %es:(%edi) # encoding: [0x66,0x67,0xab] 21 stosb %al, %es:(%edi) 22 //CHECK: stosb %al, %es:(%edi) # encoding: [0x67,0xaa] 23 scas %es:(%edi), %al 24 //CHECK: scasb %es:(%edi), %al # encoding: [0x67,0xae] 25 scas %es:(%di), %ax 26 //CHECK: scasw %es:(%di), %ax # encoding: [0xaf] 27 cmpsb 28 //CHECK: cmpsb %es:(%edi), (%esi) # encoding: [0x67,0xa6] 29 cmpsw (%edi), (%esi) 30 //CHECK: cmpsw %es:(%edi), (%esi) # encoding: [0x67,0xa7] 31 cmpsl %es:(%edi), %ss:(%esi) 32 //CHECK: cmpsl %es:(%edi), %ss:(%esi) # encoding: [0x66,0x36,0x67,0xa7] 33 movsb (%esi), (%edi) 34 //CHECK: movsb (%esi), %es:(%edi) # encoding: [0x67,0xa4] 35 movsl %gs:(%esi), (%edi) 36 //CHECK: movsl %gs:(%esi), %es:(%edi) # encoding: [0x66,0x65,0x67,0xa5] 37 outsb 38 //CHECK: outsb (%esi), %dx # encoding: [0x67,0x6e] 39 outsw %fs:(%esi), %dx 40 //CHECK: outsw %fs:(%esi), %dx # encoding: [0x64,0x67,0x6f] 41 insw %dx, (%di) 42 //CHECK: insw %dx, %es:(%di) # encoding: [0x6d] 43 call $0x7ace,$0x7ace 44 //CHECK: lcalll $31438, $31438 # encoding: [0x66,0x9a,0xce,0x7a,0x00,0x00,0xce,0x7a] 45 ret 46 //CHECK: retl # encoding: [0x66,0xc3] 47 pop %ss 48 //CHECK: popl %ss # encoding: [0x66,0x17] 49 enter $0x7ace,$0x7f 50 //CHECK: enter $31438, $127 # encoding: [0xc8,0xce,0x7a,0x7f] 51 leave 52 //CHECK: leave # encoding: [0xc9] 53 push %ss 54 //CHECK: pushl %ss # encoding: [0x66,0x16] 55 pop %ss 56 //CHECK: popl %ss # encoding: [0x66,0x17] 57 popa 58 //CHECK: popal # encoding: [0x66,0x61] 59 pushf 60 //CHECK: pushfl # encoding: [0x66,0x9c] 61 popf 62 //CHECK: popfl # encoding: [0x66,0x9d] 63 pushw 4 64 //CHECK: pushw 4 # encoding: [0xff,0x36,0x04,0x00] 65 addw $1, (,%eax,4) 66 //CHECK: addw $1, (,%eax,4) # encoding: [0x67,0x83,0x04,0x85,0x00,0x00,0x00,0x00,0x01] 67 68 69 70