mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
This patch implements jalx instruction for Mips architecture.This instruction executes a procedure call within the current 256 MB-aligned region and change the ISA Mode from MIPS32 to microMIPS32 or MIPS16e. Usage samples for assembler and dissasembler are provided as well.
llvm-svn: 202706
This commit is contained in:
parent
8d3b137235
commit
c17b0032b0
@ -1038,6 +1038,7 @@ def B : UncondBranch<BEQ>;
|
||||
|
||||
def JAL : MMRel, JumpLink<"jal", calltarget>, FJ<3>;
|
||||
def JALR : MMRel, JumpLinkReg<"jalr", GPR32Opnd>, JALR_FM;
|
||||
def JALX : MMRel, JumpLink<"jalx", calltarget>, FJ<0x1D>;
|
||||
def JALRPseudo : JumpLinkRegPseudo<GPR32Opnd, JALR, RA>;
|
||||
def BGEZAL : MMRel, BGEZAL_FT<"bgezal", brtarget, GPR32Opnd>, BGEZAL_FM<0x11>;
|
||||
def BLTZAL : MMRel, BGEZAL_FT<"bltzal", brtarget, GPR32Opnd>, BGEZAL_FM<0x10>;
|
||||
|
@ -206,6 +206,9 @@
|
||||
# CHECK: jal 1328
|
||||
0x0c 0x00 0x01 0x4c
|
||||
|
||||
# CHECK: jalx 1328
|
||||
0x74 0x00 0x01 0x4c
|
||||
|
||||
# CHECK: jalr $7
|
||||
0x00 0xe0 0xf8 0x09
|
||||
|
||||
|
@ -206,6 +206,9 @@
|
||||
# CHECK: jal 1328
|
||||
0x4c 0x01 0x00 0x0c
|
||||
|
||||
# CHECK: jalx 1328
|
||||
0x4c 0x01 0x00 0x74
|
||||
|
||||
# CHECK: jalr $7
|
||||
0x09 0xf8 0xe0 0x00
|
||||
|
||||
|
@ -215,6 +215,9 @@
|
||||
# CHECK: jal 1328
|
||||
0x0c 0x00 0x01 0x4c
|
||||
|
||||
# CHECK: jalx 1328
|
||||
0x74 0x00 0x01 0x4c
|
||||
|
||||
# CHECK: jalr $7
|
||||
0x00 0xe0 0xf8 0x09
|
||||
|
||||
|
@ -215,6 +215,9 @@
|
||||
# CHECK: jal 1328
|
||||
0x4c 0x01 0x00 0x0c
|
||||
|
||||
# CHECK: jalx 1328
|
||||
0x4c 0x01 0x00 0x74
|
||||
|
||||
# CHECK: jalr $7
|
||||
0x09 0xf8 0xe0 0x00
|
||||
|
||||
|
@ -101,12 +101,16 @@ end_of_code:
|
||||
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK32: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
|
||||
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK32:lab:
|
||||
# CHECK32: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
|
||||
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK32: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
|
||||
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK32: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
|
||||
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK32: jalx lab # encoding: [A,A,A,0b011101AA]
|
||||
# CHECK32: # fixup A - offset: 0, value: lab, kind: fixup_Mips_26
|
||||
# CHECK32: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
|
||||
# CHECK64: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
@ -120,13 +124,16 @@ end_of_code:
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK64: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK64:lab:
|
||||
# CHECK64: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK64: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
# CHECK64: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
|
||||
# CHECK64: jalx lab # encoding: [A,A,A,0b011101AA]
|
||||
# CHECK64: # fixup A - offset: 0, value: lab, kind: fixup_Mips_26
|
||||
# CHECK64: nop # encoding: [0x00,0x00,0x00,0x00]
|
||||
|
||||
j 1328
|
||||
nop
|
||||
@ -140,9 +147,12 @@ end_of_code:
|
||||
nop
|
||||
jr $7
|
||||
nop
|
||||
lab:
|
||||
j $7
|
||||
nop
|
||||
jal $25
|
||||
nop
|
||||
jal $4,$25
|
||||
nop
|
||||
jalx lab
|
||||
nop
|
||||
|
Loading…
Reference in New Issue
Block a user