mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
64-bit jump register instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b89498979
commit
4fd40b3604
@ -175,6 +175,7 @@ def SCD : SCBase<0x3c, "scd", CPU64Regs, mem>, Requires<[NotN64]>;
|
|||||||
def SCD_P8 : SCBase<0x3c, "scd", CPU64Regs, mem64>, Requires<[IsN64]>;
|
def SCD_P8 : SCBase<0x3c, "scd", CPU64Regs, mem64>, Requires<[IsN64]>;
|
||||||
|
|
||||||
/// Jump and Branch Instructions
|
/// Jump and Branch Instructions
|
||||||
|
def JR64 : JumpFR<0x00, 0x08, "jr", CPU64Regs>;
|
||||||
def JAL64 : JumpLink64<0x03, "jal">;
|
def JAL64 : JumpLink64<0x03, "jal">;
|
||||||
def JALR64 : JumpLinkReg64<0x00, 0x09, "jalr">;
|
def JALR64 : JumpLinkReg64<0x00, 0x09, "jalr">;
|
||||||
def BEQ64 : CBranch<0x04, "beq", seteq, CPU64Regs>;
|
def BEQ64 : CBranch<0x04, "beq", seteq, CPU64Regs>;
|
||||||
|
@ -458,10 +458,11 @@ class JumpFJ<bits<6> op, string instr_asm>:
|
|||||||
FJ<op, (outs), (ins jmptarget:$target),
|
FJ<op, (outs), (ins jmptarget:$target),
|
||||||
!strconcat(instr_asm, "\t$target"), [(br bb:$target)], IIBranch>;
|
!strconcat(instr_asm, "\t$target"), [(br bb:$target)], IIBranch>;
|
||||||
|
|
||||||
let isBranch=1, isTerminator=1, isBarrier=1, rd=0, hasDelaySlot = 1 in
|
let isBranch=1, isTerminator=1, isBarrier=1, rd=0, hasDelaySlot = 1,
|
||||||
class JumpFR<bits<6> op, bits<6> func, string instr_asm>:
|
isIndirectBranch = 1 in
|
||||||
FR<op, func, (outs), (ins CPURegs:$rs),
|
class JumpFR<bits<6> op, bits<6> func, string instr_asm, RegisterClass RC>:
|
||||||
!strconcat(instr_asm, "\t$rs"), [(brind CPURegs:$rs)], IIBranch> {
|
FR<op, func, (outs), (ins RC:$rs),
|
||||||
|
!strconcat(instr_asm, "\t$rs"), [(brind RC:$rs)], IIBranch> {
|
||||||
let rt = 0;
|
let rt = 0;
|
||||||
let rd = 0;
|
let rd = 0;
|
||||||
let shamt = 0;
|
let shamt = 0;
|
||||||
@ -779,8 +780,7 @@ def SC_P8 : SCBase<0x38, "sc", CPURegs, mem64>, Requires<[IsN64]>;
|
|||||||
|
|
||||||
/// Jump and Branch Instructions
|
/// Jump and Branch Instructions
|
||||||
def J : JumpFJ<0x02, "j">;
|
def J : JumpFJ<0x02, "j">;
|
||||||
let isIndirectBranch = 1 in
|
def JR : JumpFR<0x00, 0x08, "jr", CPURegs>;
|
||||||
def JR : JumpFR<0x00, 0x08, "jr">;
|
|
||||||
def JAL : JumpLink<0x03, "jal">;
|
def JAL : JumpLink<0x03, "jal">;
|
||||||
def JALR : JumpLinkReg<0x00, 0x09, "jalr">;
|
def JALR : JumpLinkReg<0x00, 0x09, "jalr">;
|
||||||
def BEQ : CBranch<0x04, "beq", seteq, CPURegs>;
|
def BEQ : CBranch<0x04, "beq", seteq, CPURegs>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user