mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
Added LDRD_PRE/POST & STRD_PRE/POST for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96619 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
845c042734
commit
39a4bb3527
@ -708,6 +708,20 @@ class AI3ldsbpr<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
let Inst{24} = 1; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
class AI3lddpr<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
string opc, string asm, string cstr, list<dag> pattern>
|
||||
: I<oops, iops, AddrMode3, Size4Bytes, IndexModePre, f, itin,
|
||||
opc, asm, cstr, pattern> {
|
||||
let Inst{4} = 1;
|
||||
let Inst{5} = 0; // H bit
|
||||
let Inst{6} = 1; // S bit
|
||||
let Inst{7} = 1;
|
||||
let Inst{20} = 0; // L bit
|
||||
let Inst{21} = 1; // W bit
|
||||
let Inst{24} = 1; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
|
||||
|
||||
// Pre-indexed stores
|
||||
class AI3sthpr<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
@ -723,6 +737,19 @@ class AI3sthpr<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
let Inst{24} = 1; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
class AI3stdpr<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
string opc, string asm, string cstr, list<dag> pattern>
|
||||
: I<oops, iops, AddrMode3, Size4Bytes, IndexModePre, f, itin,
|
||||
opc, asm, cstr, pattern> {
|
||||
let Inst{4} = 1;
|
||||
let Inst{5} = 1; // H bit
|
||||
let Inst{6} = 1; // S bit
|
||||
let Inst{7} = 1;
|
||||
let Inst{20} = 0; // L bit
|
||||
let Inst{21} = 1; // W bit
|
||||
let Inst{24} = 1; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
|
||||
// Post-indexed loads
|
||||
class AI3ldhpo<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
@ -764,6 +791,19 @@ class AI3ldsbpo<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
let Inst{24} = 0; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
class AI3lddpo<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
string opc, string asm, string cstr, list<dag> pattern>
|
||||
: I<oops, iops, AddrMode3, Size4Bytes, IndexModePost, f, itin,
|
||||
opc, asm, cstr, pattern> {
|
||||
let Inst{4} = 1;
|
||||
let Inst{5} = 0; // H bit
|
||||
let Inst{6} = 1; // S bit
|
||||
let Inst{7} = 1;
|
||||
let Inst{20} = 0; // L bit
|
||||
let Inst{21} = 0; // W bit
|
||||
let Inst{24} = 0; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
|
||||
// Post-indexed stores
|
||||
class AI3sthpo<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
@ -779,6 +819,19 @@ class AI3sthpo<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
let Inst{24} = 0; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
class AI3stdpo<dag oops, dag iops, Format f, InstrItinClass itin,
|
||||
string opc, string asm, string cstr, list<dag> pattern>
|
||||
: I<oops, iops, AddrMode3, Size4Bytes, IndexModePost, f, itin,
|
||||
opc, asm, cstr, pattern> {
|
||||
let Inst{4} = 1;
|
||||
let Inst{5} = 1; // H bit
|
||||
let Inst{6} = 1; // S bit
|
||||
let Inst{7} = 1;
|
||||
let Inst{20} = 0; // L bit
|
||||
let Inst{21} = 0; // W bit
|
||||
let Inst{24} = 0; // P bit
|
||||
let Inst{27-25} = 0b000;
|
||||
}
|
||||
|
||||
|
||||
// addrmode4 instructions
|
||||
|
@ -1067,6 +1067,19 @@ def LDRSB_PRE : AI3ldsbpr<(outs GPR:$dst, GPR:$base_wb),
|
||||
def LDRSB_POST: AI3ldsbpo<(outs GPR:$dst, GPR:$base_wb),
|
||||
(ins GPR:$base,am3offset:$offset), LdMiscFrm, IIC_iLoadru,
|
||||
"ldrsb", "\t$dst, [$base], $offset", "$base = $base_wb", []>;
|
||||
|
||||
// For disassembly only
|
||||
def LDRD_PRE : AI3lddpr<(outs GPR:$dst1, GPR:$dst2, GPR:$base_wb),
|
||||
(ins addrmode3:$addr), LdMiscFrm, IIC_iLoadr,
|
||||
"ldrd", "\t$dst1, $dst2, $addr!", "$addr.base = $base_wb", []>,
|
||||
Requires<[IsARM, HasV5TE]>;
|
||||
|
||||
// For disassembly only
|
||||
def LDRD_POST : AI3lddpo<(outs GPR:$dst1, GPR:$dst2, GPR:$base_wb),
|
||||
(ins GPR:$base,am3offset:$offset), LdMiscFrm, IIC_iLoadr,
|
||||
"ldrd", "\t$dst1, $dst2, [$base], $offset", "$base = $base_wb", []>,
|
||||
Requires<[IsARM, HasV5TE]>;
|
||||
|
||||
}
|
||||
|
||||
// LDRT, LDRBT, LDRSBT, LDRHT, LDRSHT are for disassembly only.
|
||||
@ -1164,6 +1177,20 @@ def STRB_POST: AI2stbpo<(outs GPR:$base_wb),
|
||||
[(set GPR:$base_wb, (post_truncsti8 GPR:$src,
|
||||
GPR:$base, am2offset:$offset))]>;
|
||||
|
||||
// For disassembly only
|
||||
def STRD_PRE : AI3stdpr<(outs GPR:$base_wb),
|
||||
(ins GPR:$src1, GPR:$src2, GPR:$base, am3offset:$offset),
|
||||
StMiscFrm, IIC_iStoreru,
|
||||
"strd", "\t$src1, $src2, [$base, $offset]!",
|
||||
"$base = $base_wb", []>;
|
||||
|
||||
// For disassembly only
|
||||
def STRD_POST: AI3stdpo<(outs GPR:$base_wb),
|
||||
(ins GPR:$src1, GPR:$src2, GPR:$base, am3offset:$offset),
|
||||
StMiscFrm, IIC_iStoreru,
|
||||
"strd", "\t$src1, $src2, [$base], $offset",
|
||||
"$base = $base_wb", []>;
|
||||
|
||||
// STRT and STRBT are for disassembly only.
|
||||
|
||||
def STRT : AI2stwpo<(outs GPR:$base_wb),
|
||||
|
Loading…
x
Reference in New Issue
Block a user