File: clobber_frame_ptr_x32.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (53 lines) | stat: -rw-r--r-- 1,739 bytes parent folder | download | duplicates (6)
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
51
52
53
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc < %s | FileCheck %s

target triple = "x86_64-linux-gnux32"

define i32 @foo() {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    pushq %rbp
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:    .cfi_offset %rbp, -16
; CHECK-NEXT:    movq %rsp, %rbp
; CHECK-NEXT:    .cfi_def_cfa_register %rbp
; CHECK-NEXT:    subq $16, %rsp
; CHECK-NEXT:    movl $4, -8(%rbp)
; CHECK-NEXT:    movl $5, -4(%rbp)
; CHECK-NEXT:    movl -8(%rbp), %eax
; CHECK-NEXT:    movq %rsp, %rcx
; CHECK-NEXT:    addq $15, %rax
; CHECK-NEXT:    andq $-16, %rax
; CHECK-NEXT:    movq %rcx, %rdx
; CHECK-NEXT:    subq %rax, %rdx
; CHECK-NEXT:    movq %rdx, %rsp
; CHECK-NEXT:    negq %rax
; CHECK-NEXT:    movl $1, (%rcx,%rax)
; CHECK-NEXT:    pushq %rbp
; CHECK-NEXT:    pushq %rax
; CHECK-NEXT:    .cfi_remember_state
; CHECK-NEXT:    .cfi_escape 0x0f, 0x06, 0x77, 0x08, 0x06, 0x11, 0x10, 0x22 #
; CHECK-NEXT:    movl $123, %ebp
; CHECK-NEXT:    #APP
; CHECK-NEXT:    nop
; CHECK-NEXT:    #NO_APP
; CHECK-NEXT:    addq $8, %rsp
; CHECK-NEXT:    popq %rbp
; CHECK-NEXT:    .cfi_restore_state
; CHECK-NEXT:    movl -4(%rbp), %eax
; CHECK-NEXT:    movq %rbp, %rsp
; CHECK-NEXT:    popq %rbp
; CHECK-NEXT:    .cfi_def_cfa %rsp, 8
; CHECK-NEXT:    retq
entry:
  %size = alloca i32, align 4
  %g = alloca i32, align 4
  store volatile i32 4, ptr %size, align 4
  store volatile i32 5, ptr %g, align 4
  %len = load volatile i32, ptr %size, align 4
  %var_array = alloca i8, i32 %len, align 16
  store i32 1, ptr %var_array, align 16
  call void asm "nop", "{ebp},~{memory}"(i32 123)
  %retval = load i32, ptr %g, align 4
  ret i32 %retval
}