| 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: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ | 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ |
| 7 ; RUN: -allow-externally-defined-symbols | FileCheck %s | 7 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
| 8 | 8 |
| 9 declare i32 @memcpy_helper2(i32 %buf, i32 %buf2, i32 %n) | 9 declare i32 @memcpy_helper2(i32 %buf, i32 %buf2, i32 %n) |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 ; and stack slot assignment code, and may need to be relaxed if the | 24 ; and stack slot assignment code, and may need to be relaxed if the |
| 25 ; lowering code changes. | 25 ; lowering code changes. |
| 26 | 26 |
| 27 ; CHECK-LABEL: memcpy_helper | 27 ; CHECK-LABEL: memcpy_helper |
| 28 ; CHECK: push ebp | 28 ; CHECK: push ebp |
| 29 ; CHECK: mov ebp,esp | 29 ; CHECK: mov ebp,esp |
| 30 ; CHECK: sub esp,0x18 | 30 ; CHECK: sub esp,0x18 |
| 31 ; CHECK: sub esp,0x80 | 31 ; CHECK: sub esp,0x80 |
| 32 ; CHECK: mov DWORD PTR [ebp-0x4],esp | 32 ; CHECK: mov DWORD PTR [ebp-0x4],esp |
| 33 ; CHECK: mov eax,DWORD PTR [ebp+0xc] | 33 ; CHECK: mov eax,DWORD PTR [ebp+0xc] |
| 34 ; CHECK: mov DWORD PTR [ebp-0x8],eax | 34 ; CHECK: mov BYTE PTR [ebp-0x8],al |
| 35 ; CHECK: movzx eax,BYTE PTR [ebp-0x8] | 35 ; CHECK: movzx eax,BYTE PTR [ebp-0x8] |
| 36 ; CHECK: mov DWORD PTR [ebp-0xc],eax | 36 ; CHECK: mov DWORD PTR [ebp-0xc],eax |
| 37 ; CHECK: sub esp,0x10 | 37 ; CHECK: sub esp,0x10 |
| 38 ; CHECK: mov eax,DWORD PTR [ebp+0x8] | 38 ; CHECK: mov eax,DWORD PTR [ebp+0x8] |
| 39 ; CHECK: mov DWORD PTR [esp],eax | 39 ; CHECK: mov DWORD PTR [esp],eax |
| 40 ; CHECK: mov eax,DWORD PTR [ebp-0x4] | 40 ; CHECK: mov eax,DWORD PTR [ebp-0x4] |
| 41 ; CHECK: mov DWORD PTR [esp+0x4],eax | 41 ; CHECK: mov DWORD PTR [esp+0x4],eax |
| 42 ; CHECK: mov eax,DWORD PTR [ebp-0xc] | 42 ; CHECK: mov eax,DWORD PTR [ebp-0xc] |
| 43 ; CHECK: mov DWORD PTR [esp+0x8],eax | 43 ; CHECK: mov DWORD PTR [esp+0x8],eax |
| 44 ; CHECK: call {{.*}} R_{{.*}} memcpy_helper2 | 44 ; CHECK: call {{.*}} R_{{.*}} memcpy_helper2 |
| OLD | NEW |