OLD | NEW |
1 ; This test originally exhibited a bug in ebp-based stack slots. The | 1 ; This test originally exhibited a bug in ebp-based stack slots. The |
2 ; problem was that during a function call push sequence, the esp | 2 ; problem was that during a function call push sequence, the esp |
3 ; adjustment was incorrectly added to the stack/frame offset for | 3 ; adjustment was incorrectly added to the stack/frame offset for |
4 ; ebp-based frames. | 4 ; ebp-based frames. |
5 | 5 |
6 ; RUN: %llvm2ice -Om1 --target=x8632 --verbose none %s \ | 6 ; TODO(kschimpf) Find out why lc2i is needed. |
| 7 ; RUN: %lc2i -i %s --args -Om1 --target=x8632 --verbose none \ |
7 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ | 8 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 9 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
9 | 10 |
10 declare i32 @memcpy_helper2(i32 %buf, i32 %buf2, i32 %n) | 11 declare i32 @memcpy_helper2(i32 %buf, i32 %buf2, i32 %n) |
11 | 12 |
12 define i32 @memcpy_helper(i32 %buf, i32 %n) { | 13 define i32 @memcpy_helper(i32 %buf, i32 %n) { |
13 entry: | 14 entry: |
14 %n.arg_trunc = trunc i32 %n to i8 | 15 %n.arg_trunc = trunc i32 %n to i8 |
15 %buf2 = alloca i8, i32 128, align 4 | 16 %buf2 = alloca i8, i32 128, align 4 |
16 %buf2.asint = ptrtoint i8* %buf2 to i32 | 17 %buf2.asint = ptrtoint i8* %buf2 to i32 |
(...skipping 19 matching lines...) Loading... |
36 ; CHECK: movzx eax, byte ptr [ebp - 4] | 37 ; CHECK: movzx eax, byte ptr [ebp - 4] |
37 ; CHECK: mov dword ptr [ebp - 16], eax | 38 ; CHECK: mov dword ptr [ebp - 16], eax |
38 ; CHECK: sub esp, 16 | 39 ; CHECK: sub esp, 16 |
39 ; CHECK: mov ecx, dword ptr [ebp + 8] | 40 ; CHECK: mov ecx, dword ptr [ebp + 8] |
40 ; CHECK: mov dword ptr [esp], ecx | 41 ; CHECK: mov dword ptr [esp], ecx |
41 ; CHECK: mov ecx, dword ptr [ebp - 12] | 42 ; CHECK: mov ecx, dword ptr [ebp - 12] |
42 ; CHECK: mov dword ptr [esp + 4], ecx | 43 ; CHECK: mov dword ptr [esp + 4], ecx |
43 ; CHECK: mov ecx, dword ptr [ebp - 16] | 44 ; CHECK: mov ecx, dword ptr [ebp - 16] |
44 ; CHECK: mov dword ptr [esp + 8], ecx | 45 ; CHECK: mov dword ptr [esp + 8], ecx |
45 ; CHECK: call -4 | 46 ; CHECK: call -4 |
OLD | NEW |