| OLD | NEW |
| 1 ; This tests the NaCl intrinsics not related to atomic operations. | 1 ; This tests the NaCl intrinsics not related to atomic operations. |
| 2 | 2 |
| 3 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer | 3 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer |
| 4 ; doesn't know how to symbolize non-section-local functions. | 4 ; doesn't know how to symbolize non-section-local functions. |
| 5 ; The newer LLVM 3.6 one does work, but watch out for other bugs. | 5 ; The newer LLVM 3.6 one does work, but watch out for other bugs. |
| 6 | 6 |
| 7 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 7 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
| 8 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s | 8 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s |
| 9 ; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \ | 9 ; RUN: %p2i -i %s --args -O2 --verbose none -sandbox \ |
| 10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ | 10 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ; CALLTARGETS-LABEL: test_nacl_read_tp | 67 ; CALLTARGETS-LABEL: test_nacl_read_tp |
| 68 ; CALLTARGETS: call __nacl_read_tp | 68 ; CALLTARGETS: call __nacl_read_tp |
| 69 | 69 |
| 70 define i32 @test_nacl_read_tp_more_addressing() { | 70 define i32 @test_nacl_read_tp_more_addressing() { |
| 71 entry: | 71 entry: |
| 72 %ptr = call i8* @llvm.nacl.read.tp() | 72 %ptr = call i8* @llvm.nacl.read.tp() |
| 73 %__1 = ptrtoint i8* %ptr to i32 | 73 %__1 = ptrtoint i8* %ptr to i32 |
| 74 %x = add i32 %__1, %__1 | 74 %x = add i32 %__1, %__1 |
| 75 %__3 = inttoptr i32 %x to i32* | 75 %__3 = inttoptr i32 %x to i32* |
| 76 %v = load i32* %__3, align 1 | 76 %v = load i32* %__3, align 1 |
| 77 %v_add = add i32 %v, 1 |
| 78 |
| 77 %ptr2 = call i8* @llvm.nacl.read.tp() | 79 %ptr2 = call i8* @llvm.nacl.read.tp() |
| 78 %__6 = ptrtoint i8* %ptr2 to i32 | 80 %__6 = ptrtoint i8* %ptr2 to i32 |
| 79 %y = add i32 %__6, 4 | 81 %y = add i32 %__6, 4 |
| 80 %__8 = inttoptr i32 %y to i32* | 82 %__8 = inttoptr i32 %y to i32* |
| 81 store i32 %v, i32* %__8, align 1 | 83 %v_add2 = add i32 %v, 4 |
| 84 store i32 %v_add2, i32* %__8, align 1 |
| 82 ret i32 %v | 85 ret i32 %v |
| 83 } | 86 } |
| 84 ; CHECK-LABEL: test_nacl_read_tp_more_addressing | 87 ; CHECK-LABEL: test_nacl_read_tp_more_addressing |
| 85 ; CHECK: mov e{{.*}}, dword ptr gs:[0] | 88 ; CHECK: mov e{{.*}}, dword ptr gs:[0] |
| 86 ; CHECK: mov e{{.*}}, dword ptr gs:[0] | 89 ; CHECK: mov e{{.*}}, dword ptr gs:[0] |
| 87 ; CHECKO2REM-LABEL: test_nacl_read_tp_more_addressing | 90 ; CHECKO2REM-LABEL: test_nacl_read_tp_more_addressing |
| 88 ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] | 91 ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] |
| 89 ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] | 92 ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] |
| 90 ; CHECKO2UNSANDBOXEDREM-LABEL: test_nacl_read_tp_more_addressing | 93 ; CHECKO2UNSANDBOXEDREM-LABEL: test_nacl_read_tp_more_addressing |
| 91 ; CHECKO2UNSANDBOXEDREM: call -4 | 94 ; CHECKO2UNSANDBOXEDREM: call -4 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 ret void | 521 ret void |
| 519 } | 522 } |
| 520 ; CHECK-LABEL: test_stacksave_multiple | 523 ; CHECK-LABEL: test_stacksave_multiple |
| 521 ; At least 3 copies of esp, but probably more from having to do the allocas. | 524 ; At least 3 copies of esp, but probably more from having to do the allocas. |
| 522 ; CHECK: mov {{.*}}, esp | 525 ; CHECK: mov {{.*}}, esp |
| 523 ; CHECK: mov {{.*}}, esp | 526 ; CHECK: mov {{.*}}, esp |
| 524 ; CHECK: mov {{.*}}, esp | 527 ; CHECK: mov {{.*}}, esp |
| 525 ; CHECK: mov esp, {{.*}} | 528 ; CHECK: mov esp, {{.*}} |
| 526 | 529 |
| 527 ; ERRORS-NOT: ICE translation error | 530 ; ERRORS-NOT: ICE translation error |
| OLD | NEW |