51 lines · plain
1# RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -x86-pad-max-prefix-size=15 -x86-pad-for-align=1 | llvm-objdump --no-print-imm-hex -d - | FileCheck %s2 3# Check prefix padding generation for all cases on 32 bit x86.4 5# CHECK: 1: 3e 3e 3e 3e 3e 3e 3e 3e 3e 81 e1 01 00 00 00 andl $1, %ecx6# CHECK: 10: 3e 3e 3e 3e 3e 3e 3e 3e 3e 81 21 01 00 00 00 andl $1, %ds:(%ecx)7# CHECK: 1f: 2e 2e 2e 2e 2e 2e 2e 2e 2e 81 21 01 00 00 00 andl $1, %cs:(%ecx)8# CHECK: 2e: 3e 3e 3e 3e 3e 3e 3e 3e 3e 81 21 01 00 00 00 andl $1, %ds:(%ecx)9# CHECK: 3d: 26 26 26 26 26 26 26 26 26 81 21 01 00 00 00 andl $1, %es:(%ecx)10# CHECK: 4c: 64 64 64 64 64 64 64 64 64 81 21 01 00 00 00 andl $1, %fs:(%ecx)11# CHECK: 5b: 65 65 65 65 65 65 65 65 65 81 21 01 00 00 00 andl $1, %gs:(%ecx)12# CHECK: 6a: 36 36 36 36 36 36 36 36 36 81 21 01 00 00 00 andl $1, %ss:(%ecx)13# CHECK: 79: 3e 3e 3e 3e 3e 81 a1 00 00 00 00 01 00 00 00 andl $1, %ds:(%ecx)14# CHECK: 88: 3e 3e 3e 3e 3e 81 a1 00 00 00 00 01 00 00 00 andl $1, %ds:(%ecx)15# CHECK: 97: 36 36 36 36 36 36 36 36 81 24 24 01 00 00 00 andl $1, %ss:(%esp)16# CHECK: a6: 65 65 65 65 65 65 65 65 81 24 24 01 00 00 00 andl $1, %gs:(%esp)17# CHECK: b5: 36 36 36 36 81 a4 24 00 00 00 00 01 00 00 00 andl $1, %ss:(%esp)18# CHECK: c4: 36 36 36 36 36 36 36 36 81 65 00 01 00 00 00 andl $1, %ss:(%ebp)19# CHECK: d3: 65 65 65 65 65 65 65 65 81 65 00 01 00 00 00 andl $1, %gs:(%ebp)20# CHECK: e2: 36 36 36 36 36 81 a5 00 00 00 00 01 00 00 00 andl $1, %ss:(%ebp)21 .text22 .section .text23 .p2align 824bar:25 int3 26foo:27 # non-memory28 andl $foo, %ecx29 # memory, non-esp/ebp30 andl $foo, (%ecx)31 andl $foo, %cs:(%ecx)32 andl $foo, %ds:(%ecx)33 andl $foo, %es:(%ecx)34 andl $foo, %fs:(%ecx)35 andl $foo, %gs:(%ecx)36 andl $foo, %ss:(%ecx)37 andl $foo, data16 (%ecx)38 andl $foo, data32 (%ecx)39 # esp w/o segment override40 andl $foo, (%esp)41 andl $foo, %gs:(%esp)42 andl $foo, data32 (%esp)43 # ebp w/o segment override44 andl $foo, (%ebp)45 andl $foo, %gs:(%ebp)46 andl $foo, data32 (%ebp)47 48 # Request enough padding to justify padding all of the above49 .p2align 850 int351