mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
Reorder some parts of the td file to by in alphabetical order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165590 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c9019d08f
commit
a5971e8c00
@ -11,69 +11,19 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
//
|
//
|
||||||
// This are pseudo formats for multiply
|
|
||||||
// This first one can be changed to non pseudo now.
|
|
||||||
//fmul
|
|
||||||
class FMULT16_ins<string asmstr, InstrItinClass itin> :
|
|
||||||
MipsPseudo16<(outs), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
|
||||||
!strconcat(asmstr, "\t$rx, $ry"), []>;
|
|
||||||
|
|
||||||
class FMULT16_LO_ins<string asmstr, InstrItinClass itin> :
|
|
||||||
MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
|
||||||
!strconcat(asmstr, "\t$rx, $ry\n\tmflo\t$rz"), []> {
|
|
||||||
let isCodeGenOnly=1;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
// RRR-type instruction format
|
|
||||||
//
|
|
||||||
|
|
||||||
class FRRR16_ins<bits<2> _f, string asmstr, InstrItinClass itin> :
|
|
||||||
FRRR16<_f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
|
||||||
!strconcat(asmstr, "\t$rz, $rx, $ry"), [], itin>;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// I8_MOVR32 instruction format (used only by the MOVR32 instructio
|
// Address operand
|
||||||
//
|
def mem16 : Operand<i32> {
|
||||||
class FI8_MOVR3216_ins<string asmstr, InstrItinClass itin>:
|
let PrintMethod = "printMemOperand";
|
||||||
FI8_MOVR3216<(outs CPU16Regs:$rz), (ins CPURegs:$r32),
|
let MIOperandInfo = (ops CPU16Regs, simm16);
|
||||||
!strconcat(asmstr, "\t$rz, $r32"), [], itin>;
|
let EncoderMethod = "getMemEncoding";
|
||||||
|
|
||||||
//
|
|
||||||
// I8_MOV32R instruction format (used only by MOV32R instruction)
|
|
||||||
//
|
|
||||||
|
|
||||||
class FI8_MOV32R16_ins<string asmstr, InstrItinClass itin>:
|
|
||||||
FI8_MOV32R16<(outs CPURegs:$r32), (ins CPU16Regs:$rz),
|
|
||||||
!strconcat(asmstr, "\t$r32, $rz"), [], itin>;
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// RR-type instruction format
|
|
||||||
//
|
|
||||||
|
|
||||||
class FRR16_ins<bits<5> f, string asmstr, InstrItinClass itin> :
|
|
||||||
FRR16<f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry),
|
|
||||||
!strconcat(asmstr, "\t$rx, $ry"), [], itin> {
|
|
||||||
}
|
|
||||||
class FRR16_M_ins<bits<5> f, string asmstr,
|
|
||||||
InstrItinClass itin> :
|
|
||||||
FRR16<f, (outs CPU16Regs:$rx), (ins),
|
|
||||||
!strconcat(asmstr, "\t$rx"), [], itin>;
|
|
||||||
|
|
||||||
class FRxRxRy16_ins<bits<5> f, string asmstr,
|
|
||||||
InstrItinClass itin> :
|
|
||||||
FRR16<f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
|
||||||
!strconcat(asmstr, "\t$rz, $ry"),
|
|
||||||
[], itin> {
|
|
||||||
let Constraints = "$rx = $rz";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let rx=0 in
|
//
|
||||||
class FRR16_JALRC_RA_only_ins<bits<1> nd_, bits<1> l_,
|
// Assembler formats in alphabetical order.
|
||||||
string asmstr, InstrItinClass itin>:
|
// Natural and pseudos are mixed together.
|
||||||
FRR16_JALRC<nd_, l_, 1, (outs), (ins), !strconcat(asmstr, "\t $$ra"),
|
//
|
||||||
[], itin> ;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// EXT-RI instruction format
|
// EXT-RI instruction format
|
||||||
//
|
//
|
||||||
@ -90,7 +40,6 @@ class FEXT_RI16_ins<bits<5> _op, string asmstr,
|
|||||||
class FEXT_RI16_PC_ins<bits<5> _op, string asmstr, InstrItinClass itin>:
|
class FEXT_RI16_PC_ins<bits<5> _op, string asmstr, InstrItinClass itin>:
|
||||||
FEXT_RI16_ins_base<_op, asmstr, "\t$rx, $$pc, $imm", itin>;
|
FEXT_RI16_ins_base<_op, asmstr, "\t$rx, $$pc, $imm", itin>;
|
||||||
|
|
||||||
|
|
||||||
class FEXT_2RI16_ins<bits<5> _op, string asmstr,
|
class FEXT_2RI16_ins<bits<5> _op, string asmstr,
|
||||||
InstrItinClass itin>:
|
InstrItinClass itin>:
|
||||||
FEXT_RI16<_op, (outs CPU16Regs:$rx), (ins CPU16Regs:$rx_, simm16:$imm),
|
FEXT_RI16<_op, (outs CPU16Regs:$rx), (ins CPU16Regs:$rx_, simm16:$imm),
|
||||||
@ -126,14 +75,76 @@ class FEXT_SHIFT16_ins<bits<2> _f, string asmstr, InstrItinClass itin>:
|
|||||||
FEXT_SHIFT16<_f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry, shamt:$sa),
|
FEXT_SHIFT16<_f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry, shamt:$sa),
|
||||||
!strconcat(asmstr, "\t$rx, $ry, $sa"), [], itin>;
|
!strconcat(asmstr, "\t$rx, $ry, $sa"), [], itin>;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Address operand
|
// I8_MOVR32 instruction format (used only by the MOVR32 instructio
|
||||||
def mem16 : Operand<i32> {
|
//
|
||||||
let PrintMethod = "printMemOperand";
|
class FI8_MOVR3216_ins<string asmstr, InstrItinClass itin>:
|
||||||
let MIOperandInfo = (ops CPU16Regs, simm16);
|
FI8_MOVR3216<(outs CPU16Regs:$rz), (ins CPURegs:$r32),
|
||||||
let EncoderMethod = "getMemEncoding";
|
!strconcat(asmstr, "\t$rz, $r32"), [], itin>;
|
||||||
|
|
||||||
|
//
|
||||||
|
// I8_MOV32R instruction format (used only by MOV32R instruction)
|
||||||
|
//
|
||||||
|
|
||||||
|
class FI8_MOV32R16_ins<string asmstr, InstrItinClass itin>:
|
||||||
|
FI8_MOV32R16<(outs CPURegs:$r32), (ins CPU16Regs:$rz),
|
||||||
|
!strconcat(asmstr, "\t$r32, $rz"), [], itin>;
|
||||||
|
|
||||||
|
//
|
||||||
|
// This are pseudo formats for multiply
|
||||||
|
// This first one can be changed to non pseudo now.
|
||||||
|
//
|
||||||
|
// MULT
|
||||||
|
//
|
||||||
|
class FMULT16_ins<string asmstr, InstrItinClass itin> :
|
||||||
|
MipsPseudo16<(outs), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
||||||
|
!strconcat(asmstr, "\t$rx, $ry"), []>;
|
||||||
|
|
||||||
|
//
|
||||||
|
// MULT-LO
|
||||||
|
//
|
||||||
|
class FMULT16_LO_ins<string asmstr, InstrItinClass itin> :
|
||||||
|
MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
||||||
|
!strconcat(asmstr, "\t$rx, $ry\n\tmflo\t$rz"), []> {
|
||||||
|
let isCodeGenOnly=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// RR-type instruction format
|
||||||
|
//
|
||||||
|
|
||||||
|
class FRR16_ins<bits<5> f, string asmstr, InstrItinClass itin> :
|
||||||
|
FRR16<f, (outs CPU16Regs:$rx), (ins CPU16Regs:$ry),
|
||||||
|
!strconcat(asmstr, "\t$rx, $ry"), [], itin> {
|
||||||
|
}
|
||||||
|
class FRR16_M_ins<bits<5> f, string asmstr,
|
||||||
|
InstrItinClass itin> :
|
||||||
|
FRR16<f, (outs CPU16Regs:$rx), (ins),
|
||||||
|
!strconcat(asmstr, "\t$rx"), [], itin>;
|
||||||
|
|
||||||
|
class FRxRxRy16_ins<bits<5> f, string asmstr,
|
||||||
|
InstrItinClass itin> :
|
||||||
|
FRR16<f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
||||||
|
!strconcat(asmstr, "\t$rz, $ry"),
|
||||||
|
[], itin> {
|
||||||
|
let Constraints = "$rx = $rz";
|
||||||
|
}
|
||||||
|
|
||||||
|
let rx=0 in
|
||||||
|
class FRR16_JALRC_RA_only_ins<bits<1> nd_, bits<1> l_,
|
||||||
|
string asmstr, InstrItinClass itin>:
|
||||||
|
FRR16_JALRC<nd_, l_, 1, (outs), (ins), !strconcat(asmstr, "\t $$ra"),
|
||||||
|
[], itin> ;
|
||||||
|
|
||||||
|
//
|
||||||
|
// RRR-type instruction format
|
||||||
|
//
|
||||||
|
|
||||||
|
class FRRR16_ins<bits<2> _f, string asmstr, InstrItinClass itin> :
|
||||||
|
FRRR16<_f, (outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
||||||
|
!strconcat(asmstr, "\t$rz, $rx, $ry"), [], itin>;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Some general instruction class info
|
// Some general instruction class info
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user