File: prefix-padding-32.s

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (50 lines) | stat: -rw-r--r-- 2,077 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -x86-pad-max-prefix-size=15 | llvm-objdump -d --section=.text - | FileCheck %s

# Check prefix padding generation for all cases on 32 bit x86.

# CHECK:  1: 3e 3e 3e 3e 3e 3e 3e 3e 3e 81 e1 01 00 00 00 	andl	$1, %ecx
# CHECK: 10: 3e 3e 3e 3e 3e 3e 3e 3e 3e 81 21 01 00 00 00 	andl	$1, %ds:(%ecx)
# CHECK: 1f: 2e 2e 2e 2e 2e 2e 2e 2e 2e 81 21 01 00 00 00 	andl	$1, %cs:(%ecx)
# CHECK: 2e: 3e 3e 3e 3e 3e 3e 3e 3e 3e 81 21 01 00 00 00 	andl	$1, %ds:(%ecx)
# CHECK: 3d: 26 26 26 26 26 26 26 26 26 81 21 01 00 00 00 	andl	$1, %es:(%ecx)
# CHECK: 4c: 64 64 64 64 64 64 64 64 64 81 21 01 00 00 00 	andl	$1, %fs:(%ecx)
# CHECK: 5b: 65 65 65 65 65 65 65 65 65 81 21 01 00 00 00 	andl	$1, %gs:(%ecx)
# CHECK: 6a: 36 36 36 36 36 36 36 36 36 81 21 01 00 00 00 	andl	$1, %ss:(%ecx)
# CHECK: 79: 3e 3e 3e 3e 3e 81 a1 00 00 00 00 01 00 00 00 	andl	$1, %ds:(%ecx)
# CHECK: 88: 3e 3e 3e 3e 3e 81 a1 00 00 00 00 01 00 00 00 	andl	$1, %ds:(%ecx)
# CHECK: 97: 36 36 36 36 36 36 36 36 81 24 24 01 00 00 00 	andl	$1, %ss:(%esp)
# CHECK: a6: 65 65 65 65 65 65 65 65 81 24 24 01 00 00 00 	andl	$1, %gs:(%esp)
# CHECK: b5: 36 36 36 36 81 a4 24 00 00 00 00 01 00 00 00 	andl	$1, %ss:(%esp)
# CHECK: c4: 36 36 36 36 36 36 36 36 81 65 00 01 00 00 00 	andl	$1, %ss:(%ebp)
# CHECK: d3: 65 65 65 65 65 65 65 65 81 65 00 01 00 00 00 	andl	$1, %gs:(%ebp)
# CHECK: e2: 36 36 36 36 36 81 a5 00 00 00 00 01 00 00 00 	andl	$1, %ss:(%ebp)
  .text
  .section  .text
  .p2align 8
bar:
  int3  
foo:
  # non-memory
  andl $foo, %ecx
  # memory, non-esp/ebp
  andl $foo, (%ecx)
  andl $foo, %cs:(%ecx)
  andl $foo, %ds:(%ecx)
  andl $foo, %es:(%ecx)
  andl $foo, %fs:(%ecx)
  andl $foo, %gs:(%ecx)
  andl $foo, %ss:(%ecx)
  andl $foo, data16 (%ecx)
  andl $foo, data32 (%ecx)
  # esp w/o segment override
  andl $foo, (%esp)
  andl $foo, %gs:(%esp)
  andl $foo, data32 (%esp)
  # ebp w/o segment override
  andl $foo, (%ebp)
  andl $foo, %gs:(%ebp)
  andl $foo, data32 (%ebp)

  # Request enough padding to justify padding all of the above
  .p2align 8
  int3