Skip to content

Commit 9738f64

Browse files
committed
MC/X86: Add aliases for Jcc variants.
llvm-svn: 104890
1 parent fd42e95 commit 9738f64

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed

llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,19 @@ ParseInstruction(const StringRef &Name, SMLoc NameLoc,
617617
.Case("setnz", "setne")
618618
.Case("jz", "je")
619619
.Case("jnz", "jne")
620+
.Case("jc", "jb")
621+
.Case("jecxz", "jcxz")
622+
.Case("jna", "jbe")
623+
.Case("jnae", "jb")
624+
.Case("jnb", "jae")
625+
.Case("jnbe", "ja")
626+
.Case("jnc", "jae")
627+
.Case("jng", "jle")
628+
.Case("jnge", "jl")
629+
.Case("jnl", "jge")
630+
.Case("jnle", "jg")
631+
.Case("jpe", "jp")
632+
.Case("jpo", "jnp")
620633
.Case("cmovcl", "cmovbl")
621634
.Case("cmovcl", "cmovbl")
622635
.Case("cmovnal", "cmovbel")

llvm/test/MC/MachO/jcc.s

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
2+
3+
ja 1f
4+
1: nop
5+
jae 1f
6+
1: nop
7+
jb 1f
8+
1: nop
9+
jbe 1f
10+
1: nop
11+
jc 1f
12+
1: nop
13+
jcxz 1f
14+
1: nop
15+
jecxz 1f
16+
1: nop
17+
je 1f
18+
1: nop
19+
jg 1f
20+
1: nop
21+
jge 1f
22+
1: nop
23+
jl 1f
24+
1: nop
25+
jle 1f
26+
1: nop
27+
jna 1f
28+
1: nop
29+
jnae 1f
30+
1: nop
31+
jnb 1f
32+
1: nop
33+
jnbe 1f
34+
1: nop
35+
jnc 1f
36+
1: nop
37+
jne 1f
38+
1: nop
39+
jng 1f
40+
1: nop
41+
jnge 1f
42+
1: nop
43+
jnl 1f
44+
1: nop
45+
jnle 1f
46+
1: nop
47+
jno 1f
48+
1: nop
49+
jnp 1f
50+
1: nop
51+
jns 1f
52+
1: nop
53+
jnz 1f
54+
1: nop
55+
jo 1f
56+
1: nop
57+
jp 1f
58+
1: nop
59+
jpe 1f
60+
1: nop
61+
jpo 1f
62+
1: nop
63+
js 1f
64+
1: nop
65+
jz 1f
66+
1: nop
67+
68+
// CHECK: ('cputype', 7)
69+
// CHECK: ('cpusubtype', 3)
70+
// CHECK: ('filetype', 1)
71+
// CHECK: ('num_load_commands', 1)
72+
// CHECK: ('load_commands_size', 124)
73+
// CHECK: ('flag', 0)
74+
// CHECK: ('load_commands', [
75+
// CHECK: # Load Command 0
76+
// CHECK: (('command', 1)
77+
// CHECK: ('size', 124)
78+
// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
79+
// CHECK: ('vm_addr', 0)
80+
// CHECK: ('vm_size', 96)
81+
// CHECK: ('file_offset', 152)
82+
// CHECK: ('file_size', 96)
83+
// CHECK: ('maxprot', 7)
84+
// CHECK: ('initprot', 7)
85+
// CHECK: ('num_sections', 1)
86+
// CHECK: ('flags', 0)
87+
// CHECK: ('sections', [
88+
// CHECK: # Section 0
89+
// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
90+
// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
91+
// CHECK: ('address', 0)
92+
// CHECK: ('size', 96)
93+
// CHECK: ('offset', 152)
94+
// CHECK: ('alignment', 0)
95+
// CHECK: ('reloc_offset', 0)
96+
// CHECK: ('num_reloc', 0)
97+
// CHECK: ('flags', 0x80000400)
98+
// CHECK: ('reserved1', 0)
99+
// CHECK: ('reserved2', 0)
100+
// CHECK: ),
101+
// CHECK: ('_relocations', [
102+
// CHECK: ])
103+
// CHECK: ('_section_data', 'w\x00\x90s\x00\x90r\x00\x90v\x00\x90r\x00\x90\xe3\x00\x90\xe3\x00\x90t\x00\x90\x7f\x00\x90}\x00\x90|\x00\x90~\x00\x90v\x00\x90r\x00\x90s\x00\x90w\x00\x90s\x00\x90u\x00\x90~\x00\x90|\x00\x90}\x00\x90\x7f\x00\x90q\x00\x90{\x00\x90y\x00\x90u\x00\x90p\x00\x90z\x00\x90z\x00\x90{\x00\x90x\x00\x90t\x00\x90')
104+
// CHECK: ])
105+
// CHECK: ),
106+
// CHECK: ])

0 commit comments

Comments
 (0)