Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
370e9234
Commit
370e9234
authored
13 years ago
by
Jim Grosbach
Browse files
Options
Downloads
Patches
Plain Diff
Thumb2 parsing and encoding for AND (register).
llvm-svn: 139021
parent
f30bc001
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/lib/Target/ARM/ARMInstrThumb2.td
+21
-1
21 additions, 1 deletion
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/MC/ARM/basic-thumb2-instructions.s
+17
-0
17 additions, 0 deletions
llvm/test/MC/ARM/basic-thumb2-instructions.s
with
38 additions
and
1 deletion
llvm/lib/Target/ARM/ARMInstrThumb2.td
+
21
−
1
View file @
370e9234
...
...
@@ -532,7 +532,27 @@ multiclass T2I_bin_irs<bits<4> opcod, string opc,
multiclass T2I_bin_w_irs<bits<4> opcod, string opc,
InstrItinClass iii, InstrItinClass iir, InstrItinClass iis,
PatFrag opnode, string baseOpc, bit Commutable = 0> :
T2I_bin_irs<opcod, opc, iii, iir, iis, opnode, baseOpc, Commutable, ".w">;
T2I_bin_irs<opcod, opc, iii, iir, iis, opnode, baseOpc, Commutable, ".w"> {
// Assembler aliases w/o the ".w" suffix.
def : t2InstAlias<!strconcat(opc, "${s}${p}", " $Rd, $Rn, $Rm"),
(!cast<Instruction>(!strconcat(baseOpc, "rr")) rGPR:$Rd, rGPR:$Rn,
rGPR:$Rm, pred:$p,
cc_out:$s)>;
def : t2InstAlias<!strconcat(opc, "${s}${p}", " $Rd, $Rn, $shift"),
(!cast<Instruction>(!strconcat(baseOpc, "rs")) rGPR:$Rd, rGPR:$Rn,
t2_so_reg:$shift, pred:$p,
cc_out:$s)>;
// and with the optional destination operand, too.
def : t2InstAlias<!strconcat(opc, "${s}${p}", " $Rdn, $Rm"),
(!cast<Instruction>(!strconcat(baseOpc, "rr")) rGPR:$Rdn, rGPR:$Rdn,
rGPR:$Rm, pred:$p,
cc_out:$s)>;
def : t2InstAlias<!strconcat(opc, "${s}${p}", " $Rdn, $shift"),
(!cast<Instruction>(!strconcat(baseOpc, "rs")) rGPR:$Rdn, rGPR:$Rdn,
t2_so_reg:$shift, pred:$p,
cc_out:$s)>;
}
/// T2I_rbin_is - Same as T2I_bin_irs except the order of operands are
/// reversed. The 'rr' form is only defined for the disassembler; for codegen
...
...
This diff is collapsed.
Click to expand it.
llvm/test/MC/ARM/basic-thumb2-instructions.s
+
17
−
0
View file @
370e9234
...
...
@@ -120,6 +120,23 @@ _func:
@
CHECK
:
and
r1
,
r1
,
#
255
@
encoding
:
[
0x01
,
0xf0
,
0xff
,
0x01
]
@
CHECK
:
and
r1
,
r1
,
#
255
@
encoding
:
[
0x01
,
0xf0
,
0xff
,
0x01
]
@------------------------------------------------------------------------------
@
AND
(
register
)
@------------------------------------------------------------------------------
and
r4
,
r9
,
r8
and
r1
,
r4
,
r8
,
asr
#
3
ands
r2
,
r1
,
r7
,
lsl
#
1
ands.w
r4
,
r5
,
r2
,
lsr
#
20
and.w
r9
,
r12
,
r1
,
ror
#
17
@
CHECK
:
and
.
w
r4
,
r9
,
r8
@
encoding
:
[
0x09
,
0xea
,
0x08
,
0x04
]
@
CHECK
:
and
.
w
r1
,
r4
,
r8
,
asr
#
3
@
encoding
:
[
0x04
,
0xea
,
0xe8
,
0x01
]
@
CHECK
:
ands
.
w
r2
,
r1
,
r7
,
lsl
#
1
@
encoding
:
[
0x11
,
0xea
,
0x47
,
0x02
]
@
CHECK
:
ands
.
w
r4
,
r5
,
r2
,
lsr
#
20
@
encoding
:
[
0x15
,
0xea
,
0x12
,
0x54
]
@
CHECK
:
and
.
w
r9
,
r12
,
r1
,
ror
#
17
@
encoding
:
[
0x0c
,
0xea
,
0x71
,
0x49
]
@------------------------------------------------------------------------------
@
B
@------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment