| OLD | NEW |
| 1 ; Tests basics and corner cases of x86-32 sandboxing, using -Om1 in | 1 ; Tests basics and corner cases of x86-32 sandboxing, using -Om1 in |
| 2 ; the hope that the output will remain stable. When packing bundles, | 2 ; the hope that the output will remain stable. When packing bundles, |
| 3 ; we try to limit to a few instructions with well known sizes and | 3 ; we try to limit to a few instructions with well known sizes and |
| 4 ; minimal use of registers and stack slots in the lowering sequence. | 4 ; minimal use of registers and stack slots in the lowering sequence. |
| 5 | 5 |
| 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ | 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 7 ; RUN: -allow-externally-defined-symbols \ | 7 ; RUN: -allow-externally-defined-symbols \ |
| 8 ; RUN: -ffunction-sections -sandbox | FileCheck %s | 8 ; RUN: -ffunction-sections -sandbox | FileCheck %s |
| 9 | 9 |
| 10 declare void @call_target() | 10 declare void @call_target() |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 ; observed by the stack adjustment for accessing stack-allocated | 244 ; observed by the stack adjustment for accessing stack-allocated |
| 245 ; variables. | 245 ; variables. |
| 246 define internal void @checkpoint_restore_stack_adjustment(i32 %arg) { | 246 define internal void @checkpoint_restore_stack_adjustment(i32 %arg) { |
| 247 entry: | 247 entry: |
| 248 call void @call_target() | 248 call void @call_target() |
| 249 ; bundle boundary | 249 ; bundle boundary |
| 250 call void @checkpoint_restore_stack_adjustment(i32 %arg) | 250 call void @checkpoint_restore_stack_adjustment(i32 %arg) |
| 251 ret void | 251 ret void |
| 252 } | 252 } |
| 253 ; CHECK-LABEL: checkpoint_restore_stack_adjustment | 253 ; CHECK-LABEL: checkpoint_restore_stack_adjustment |
| 254 ; CHECK: sub esp,0x1c |
| 254 ; CHECK: call | 255 ; CHECK: call |
| 255 ; CHECK: sub esp,0x10 | |
| 256 ; The address of %arg should be [esp+0x20], not [esp+0x30]. | 256 ; The address of %arg should be [esp+0x20], not [esp+0x30]. |
| 257 ; CHECK-NEXT: mov [[REG:.*]],DWORD PTR [esp+0x20] | 257 ; CHECK-NEXT: mov [[REG:.*]],DWORD PTR [esp+0x20] |
| 258 ; CHECK-NEXT: mov DWORD PTR [esp],[[REG]] | 258 ; CHECK-NEXT: mov DWORD PTR [esp],[[REG]] |
| 259 ; CHECK: call | 259 ; CHECK: call |
| 260 ; CHECK: add esp,0x10 | 260 ; CHECK: add esp,0x1c |
| OLD | NEW |