Thumb2 parsing and encoding for BXJ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2011-09-02 23:43:09 +00:00
parent cefd2020a6
commit 6c3e11ea55
2 changed files with 16 additions and 6 deletions

View File

@ -3068,16 +3068,13 @@ def t2IT : Thumb2XI<(outs), (ins it_pred:$cc, it_mask:$mask),
// Branch and Exchange Jazelle -- for disassembly only
// Rm = Inst{19-16}
def t2BXJ : T2I<(outs), (ins rGPR:$func), NoItinerary, "bxj", "\t$func",
[/* For disassembly only; pattern left blank */]> {
def t2BXJ : T2I<(outs), (ins rGPR:$func), NoItinerary, "bxj", "\t$func", []> {
bits<4> func;
let Inst{31-27} = 0b11110;
let Inst{26} = 0;
let Inst{25-20} = 0b111100;
let Inst{15-14} = 0b10;
let Inst{12} = 0;
bits<4> func;
let Inst{19-16} = func;
let Inst{15-0} = 0b1000111100000000;
}
// Compare and branch on zero / non-zero

View File

@ -254,6 +254,18 @@ _func:
@ CHECK: bic.w r12, r12, r6, ror #29 @ encoding: [0x2c,0xea,0x76,0x7c]
@------------------------------------------------------------------------------
@ BXJ
@------------------------------------------------------------------------------
bxj r5
it ne
bxjne r7
@ CHECK: bxj r5 @ encoding: [0xc5,0xf3,0x00,0x8f]
@ CHECK: it ne @ encoding: [0x18,0xbf]
@ CHECK: bxjne r7 @ encoding: [0xc7,0xf3,0x00,0x8f]
@------------------------------------------------------------------------------
@ CBZ/CBNZ
@------------------------------------------------------------------------------
@ -263,6 +275,7 @@ _func:
@ CHECK: cbnz r7, #6 @ encoding: [0x1f,0xb9]
@ CHECK: cbnz r7, #12 @ encoding: [0x37,0xb9]
@------------------------------------------------------------------------------
@ IT
@------------------------------------------------------------------------------