Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: tests_lit/assembler/x86/jump_encodings.ll

Issue 914263005: Subzero: switch from llvm-objdump to objdump for lit tests (for LLVM merge) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fix some line wrap Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests_lit/assembler/x86/jump_encodings.ll
diff --git a/tests_lit/assembler/x86/jump_encodings.ll b/tests_lit/assembler/x86/jump_encodings.ll
index f8607cb48d51b42a6c89e993d4c2cb52940d4380..d594ae9d4cedec83bad94a75df71e267e95fa87e 100644
--- a/tests_lit/assembler/x86/jump_encodings.ll
+++ b/tests_lit/assembler/x86/jump_encodings.ll
@@ -2,9 +2,8 @@
; forward vs backward, using CFG labels, or local labels).
; Use -ffunction-sections so that the offsets reset for each function.
-; RUN: %p2i -i %s --args -O2 --verbose none -ffunction-sections \
-; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
-; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
+; RUN: %p2i --assemble --disassemble -i %s --args -O2 --verbose none \
+; RUN: -ffunction-sections | FileCheck %s
; Use atomic ops as filler, which shouldn't get optimized out.
declare void @llvm.nacl.atomic.store.i32(i32, i32*, i32)
@@ -25,15 +24,13 @@ next2:
}
; CHECK-LABEL: test_near_backward
-; CHECK: 8: {{.*}} mov dword ptr
+; CHECK: 8: {{.*}} mov DWORD PTR
; CHECK-NEXT: a: {{.*}} mfence
-; CHECK-NEXT: d: {{.*}} mov dword ptr
+; CHECK-NEXT: d: {{.*}} mov DWORD PTR
; CHECK-NEXT: f: {{.*}} mfence
; CHECK-NEXT: 12: {{.*}} cmp
-; (0x15 + 2) - 10 == 0xd
-; CHECK-NEXT: 15: 72 f6 jb -10
-; (0x17 + 2) - 17 == 0x8
-; CHECK-NEXT: 17: eb ef jmp -17
+; CHECK-NEXT: 15: 72 f6 jb d
+; CHECK-NEXT: 17: eb ef jmp 8
; Test one of the backward branches being too large for 8 bits
; and one being just okay.
@@ -74,13 +71,11 @@ next2:
}
; CHECK-LABEL: test_far_backward1
-; CHECK: 8: {{.*}} mov {{.*}}, dword ptr [e{{[^s]}}
-; CHECK-NEXT: a: {{.*}} mov dword ptr
+; CHECK: 8: {{.*}} mov {{.*}},DWORD PTR [e{{[^s]}}
+; CHECK-NEXT: a: {{.*}} mov DWORD PTR
; CHECK-NEXT: c: {{.*}} mfence
-; (0x85 + 2) - 125 == 0xa
-; CHECK: 85: 77 83 ja -125
-; (0x87 + 5) - 132 == 0x8
-; CHECK-NEXT: 87: e9 7c ff ff ff jmp -132
+; CHECK: 85: 77 83 ja a
+; CHECK-NEXT: 87: e9 7c ff ff ff jmp 8
; Same as test_far_backward1, but with the conditional branch being
; the one that is too far.
@@ -124,14 +119,12 @@ next2:
}
; CHECK-LABEL: test_far_backward2
-; CHECK: c: {{.*}} mov {{.*}}, dword ptr [e{{[^s]}}
-; CHECK: 14: {{.*}} mov {{.*}}, dword ptr
-; CHECK-NEXT: 16: {{.*}} mov dword ptr
+; CHECK: c: {{.*}} mov {{.*}},DWORD PTR [e{{[^s]}}
+; CHECK: 14: {{.*}} mov {{.*}},DWORD PTR
+; CHECK-NEXT: 16: {{.*}} mov DWORD PTR
; CHECK-NEXT: 18: {{.*}} mfence
-; (0x8c + 6) - 134 == 0xc
-; CHECK: 8c: 0f 8e 7a ff ff ff jle -134
-; (0x92 + 2) - 126 == 0x16
-; CHECK-NEXT: 92: eb 82 jmp -126
+; CHECK: 8c: 0f 8e 7a ff ff ff jle c
+; CHECK-NEXT: 92: eb 82 jmp 16
define void @test_near_forward(i32 %iptr, i32 %val) {
entry:
@@ -151,14 +144,11 @@ next3:
; form to avoid needing a relaxation pass.
; CHECK-LABEL: test_near_forward
; CHECK: 8: {{.*}} cmp
-; CHECK-NEXT: b: 0f 82 05 00 00 00 jb 5
-; CHECK-NEXT: 11: {{.*}} mov dword ptr
+; CHECK-NEXT: b: 0f 82 05 00 00 00 jb 16
+; CHECK-NEXT: 11: {{.*}} mov DWORD PTR
; CHECK-NEXT: 13: {{.*}} mfence
-; Forward branch is 5 bytes ahead to here.
-; CHECK-NEXT: 16: {{.*}} mov dword ptr
-; Jumps back to (0x1b + 2) - 21 == 0x8 (to before the forward branch,
-; therefore knowing that the forward branch was indeed 6 bytes).
-; CHECK: 1b: eb eb jmp -21
+; CHECK-NEXT: 16: {{.*}} mov DWORD PTR
+; CHECK: 1b: eb eb jmp 8
; Unlike forward branches to cfg nodes, "local" forward branches
@@ -179,15 +169,13 @@ next2:
br i1 %cmp, label %next, label %next2
}
; CHECK-LABEL: test_local_forward_then_back
-; CHECK: 14: {{.*}} mov dword ptr
+; CHECK: 14: {{.*}} mov DWORD PTR
; CHECK-NEXT: 16: {{.*}} mfence
-; CHECK-NEXT: 19: {{.*}} mov dword ptr {{.*}}, 1
+; CHECK-NEXT: 19: {{.*}} mov DWORD PTR {{.*}},0x1
; CHECK-NEXT: 20: {{.*}} cmp
-; CHECK-NEXT: 23: {{.*}} jb 14
-; (0x37 + 2) - 37 == 0x14
-; CHECK: 37: {{.*}} jne -37
-; (0x39 + 2) - 34 == 0x19
-; CHECK: 39: {{.*}} jmp -34
+; CHECK-NEXT: 23: {{.*}} jb 33
+; CHECK: 37: {{.*}} jne 14
+; CHECK: 39: {{.*}} jmp 19
; Test that backward local branches also work and are small.
@@ -204,12 +192,9 @@ next2:
br i1 %success, label %next, label %next2
}
; CHECK-LABEL: test_local_backward
-; CHECK: 9: {{.*}} mov {{.*}}, dword
+; CHECK: 9: {{.*}} mov {{.*}},DWORD
; CHECK: b: {{.*}} mov
; CHECK-NEXT: d: {{.*}} xor
-; CHECK-NEXT: f: {{.*}} lock
-; CHECK-NEXT: 10: {{.*}} cmpxchg
-; (0x13 + 2) - 10 == 0xb
-; CHECK-NEXT: 13: 75 f6 jne -10
-; (0x1c + 2) - 21 == 0x9
-; CHECK: 1c: 74 eb je -21
+; CHECK-NEXT: f: {{.*}} lock cmpxchg
+; CHECK-NEXT: 13: 75 f6 jne b
+; CHECK: 1c: 74 eb je 9
« no previous file with comments | « tests_lit/assembler/x86/immediate_encodings.ll ('k') | tests_lit/assembler/x86/opcode_register_encodings.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698