| OLD | NEW |
| 1 ; Tests various aspects of x86 branch encodings (near vs far, | 1 ; Tests various aspects of x86 branch encodings (near vs far, |
| 2 ; forward vs backward, using CFG labels, or local labels). | 2 ; forward vs backward, using CFG labels, or local labels). |
| 3 | 3 |
| 4 ; Use -ffunction-sections so that the offsets reset for each function. | 4 ; Use -ffunction-sections so that the offsets reset for each function. |
| 5 ; RUN: %p2i -i %s --args -O2 --verbose none -ffunction-sections \ | 5 ; RUN: %p2i -i %s --args -O2 --verbose none -ffunction-sections \ |
| 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ | 6 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ |
| 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s | 7 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s |
| 8 ; RUN: %p2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s | |
| 9 | 8 |
| 10 ; Use atomic ops as filler, which shouldn't get optimized out. | 9 ; Use atomic ops as filler, which shouldn't get optimized out. |
| 11 declare void @llvm.nacl.atomic.store.i32(i32, i32*, i32) | 10 declare void @llvm.nacl.atomic.store.i32(i32, i32*, i32) |
| 12 declare i32 @llvm.nacl.atomic.load.i32(i32*, i32) | 11 declare i32 @llvm.nacl.atomic.load.i32(i32*, i32) |
| 13 declare i32 @llvm.nacl.atomic.rmw.i32(i32, i32*, i32, i32) | 12 declare i32 @llvm.nacl.atomic.rmw.i32(i32, i32*, i32, i32) |
| 14 | 13 |
| 15 define void @test_near_backward(i32 %iptr, i32 %val) { | 14 define void @test_near_backward(i32 %iptr, i32 %val) { |
| 16 entry: | 15 entry: |
| 17 br label %next | 16 br label %next |
| 18 next: | 17 next: |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 ; CHECK-LABEL: test_local_backward | 206 ; CHECK-LABEL: test_local_backward |
| 208 ; CHECK: 9: {{.*}} mov {{.*}}, dword | 207 ; CHECK: 9: {{.*}} mov {{.*}}, dword |
| 209 ; CHECK: b: {{.*}} mov | 208 ; CHECK: b: {{.*}} mov |
| 210 ; CHECK-NEXT: d: {{.*}} xor | 209 ; CHECK-NEXT: d: {{.*}} xor |
| 211 ; CHECK-NEXT: f: {{.*}} lock | 210 ; CHECK-NEXT: f: {{.*}} lock |
| 212 ; CHECK-NEXT: 10: {{.*}} cmpxchg | 211 ; CHECK-NEXT: 10: {{.*}} cmpxchg |
| 213 ; (0x13 + 2) - 10 == 0xb | 212 ; (0x13 + 2) - 10 == 0xb |
| 214 ; CHECK-NEXT: 13: 75 f6 jne -10 | 213 ; CHECK-NEXT: 13: 75 f6 jne -10 |
| 215 ; (0x1c + 2) - 21 == 0x9 | 214 ; (0x1c + 2) - 21 == 0x9 |
| 216 ; CHECK: 1c: 74 eb je -21 | 215 ; CHECK: 1c: 74 eb je -21 |
| 217 | |
| 218 ; ERRORS-NOT: ICE translation error | |
| OLD | NEW |