mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Mark load instructions with isLoad = 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41595 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b8a80f03bf
commit
2f39426ec9
@ -334,12 +334,14 @@ def CMOVNP_F : FPI<0xD8, AddRegFrm, (outs RST:$op), (ins),
|
||||
"fcmovnu\t{$op, %st(0)|%ST(0), $op}">, DB;
|
||||
|
||||
// Floating point loads & stores.
|
||||
let isLoad = 1 in {
|
||||
def LD_Fp32m : FpI<(outs RFP32:$dst), (ins f32mem:$src), ZeroArgFP,
|
||||
[(set RFP32:$dst, (loadf32 addr:$src))]>;
|
||||
def LD_Fp64m : FpI<(outs RFP64:$dst), (ins f64mem:$src), ZeroArgFP,
|
||||
[(set RFP64:$dst, (loadf64 addr:$src))]>;
|
||||
def LD_Fp80m : FpI_<(outs RFP80:$dst), (ins f80mem:$src), ZeroArgFP,
|
||||
[(set RFP80:$dst, (loadf80 addr:$src))]>;
|
||||
}
|
||||
def LD_Fp32m64 : FpI<(outs RFP64:$dst), (ins f32mem:$src), ZeroArgFP,
|
||||
[(set RFP64:$dst, (f64 (extloadf32 addr:$src)))]>;
|
||||
def LD_Fp64m80 : FpI_<(outs RFP80:$dst), (ins f64mem:$src), ZeroArgFP,
|
||||
|
@ -521,6 +521,7 @@ def MOV32mi : Ii32<0xC7, MRM0m, (outs), (ins i32mem:$dst, i32imm:$src),
|
||||
"mov{l}\t{$src, $dst|$dst, $src}",
|
||||
[(store (i32 imm:$src), addr:$dst)]>;
|
||||
|
||||
let isLoad = 1 in {
|
||||
def MOV8rm : I<0x8A, MRMSrcMem, (outs GR8 :$dst), (ins i8mem :$src),
|
||||
"mov{b}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR8:$dst, (load addr:$src))]>;
|
||||
@ -530,6 +531,7 @@ def MOV16rm : I<0x8B, MRMSrcMem, (outs GR16:$dst), (ins i16mem:$src),
|
||||
def MOV32rm : I<0x8B, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
||||
"mov{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (load addr:$src))]>;
|
||||
}
|
||||
|
||||
def MOV8mr : I<0x88, MRMDestMem, (outs), (ins i8mem :$dst, GR8 :$src),
|
||||
"mov{b}\t{$src, $dst|$dst, $src}",
|
||||
@ -2332,10 +2334,12 @@ def MOV16_rr : I<0x89, MRMDestReg, (outs GR16_:$dst), (ins GR16_:$src),
|
||||
"mov{w}\t{$src, $dst|$dst, $src}", []>, OpSize;
|
||||
def MOV32_rr : I<0x89, MRMDestReg, (outs GR32_:$dst), (ins GR32_:$src),
|
||||
"mov{l}\t{$src, $dst|$dst, $src}", []>;
|
||||
let isLoad = 1 in {
|
||||
def MOV16_rm : I<0x8B, MRMSrcMem, (outs GR16_:$dst), (ins i16mem:$src),
|
||||
"mov{w}\t{$src, $dst|$dst, $src}", []>, OpSize;
|
||||
def MOV32_rm : I<0x8B, MRMSrcMem, (outs GR32_:$dst), (ins i32mem:$src),
|
||||
"mov{l}\t{$src, $dst|$dst, $src}", []>;
|
||||
}
|
||||
def MOV16_mr : I<0x89, MRMDestMem, (outs), (ins i16mem:$dst, GR16_:$src),
|
||||
"mov{w}\t{$src, $dst|$dst, $src}", []>, OpSize;
|
||||
def MOV32_mr : I<0x89, MRMDestMem, (outs), (ins i32mem:$dst, GR32_:$src),
|
||||
|
@ -157,7 +157,7 @@ def MMX_FEMMS : MMXI<0x0E, RawFrm, (outs), (ins), "femms", [(int_x86_mmx_femms)]
|
||||
// Data Transfer Instructions
|
||||
def MMX_MOVD64rr : MMXI<0x6E, MRMSrcReg, (outs VR64:$dst), (ins GR32:$src),
|
||||
"movd\t{$src, $dst|$dst, $src}", []>;
|
||||
let isReMaterializable = 1 in
|
||||
let isLoad = 1, isReMaterializable = 1 in
|
||||
def MMX_MOVD64rm : MMXI<0x6E, MRMSrcMem, (outs VR64:$dst), (ins i32mem:$src),
|
||||
"movd\t{$src, $dst|$dst, $src}", []>;
|
||||
def MMX_MOVD64mr : MMXI<0x7E, MRMDestMem, (outs), (ins i32mem:$dst, VR64:$src),
|
||||
@ -168,7 +168,7 @@ def MMX_MOVD64to64rr : MMXRI<0x6E, MRMSrcReg, (outs VR64:$dst), (ins GR64:$src),
|
||||
|
||||
def MMX_MOVQ64rr : MMXI<0x6F, MRMSrcReg, (outs VR64:$dst), (ins VR64:$src),
|
||||
"movq\t{$src, $dst|$dst, $src}", []>;
|
||||
let isReMaterializable = 1 in
|
||||
let isLoad = 1, isReMaterializable = 1 in
|
||||
def MMX_MOVQ64rm : MMXI<0x6F, MRMSrcMem, (outs VR64:$dst), (ins i64mem:$src),
|
||||
"movq\t{$src, $dst|$dst, $src}",
|
||||
[(set VR64:$dst, (load_mmx addr:$src))]>;
|
||||
|
@ -296,7 +296,7 @@ let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
|
||||
// Move Instructions
|
||||
def MOVSSrr : SSI<0x10, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src),
|
||||
"movss\t{$src, $dst|$dst, $src}", []>;
|
||||
let isReMaterializable = 1 in
|
||||
let isLoad = 1, isReMaterializable = 1 in
|
||||
def MOVSSrm : SSI<0x10, MRMSrcMem, (outs FR32:$dst), (ins f32mem:$src),
|
||||
"movss\t{$src, $dst|$dst, $src}",
|
||||
[(set FR32:$dst, (loadf32 addr:$src))]>;
|
||||
@ -410,6 +410,7 @@ def FsMOVAPSrr : PSI<0x28, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src),
|
||||
|
||||
// Alias instruction to load FR32 from f128mem using movaps. Upper bits are
|
||||
// disregarded.
|
||||
let isLoad = 1 in
|
||||
def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}",
|
||||
[(set FR32:$dst, (alignedloadfsf32 addr:$src))]>;
|
||||
@ -586,7 +587,7 @@ defm MIN : sse1_fp_binop_rm<0x5D, "min", X86fmin,
|
||||
// Move Instructions
|
||||
def MOVAPSrr : PSI<0x28, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}", []>;
|
||||
let isReMaterializable = 1 in
|
||||
let isLoad = 1, isReMaterializable = 1 in
|
||||
def MOVAPSrm : PSI<0x28, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src),
|
||||
"movaps\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst, (alignedloadv4f32 addr:$src))]>;
|
||||
@ -597,6 +598,7 @@ def MOVAPSmr : PSI<0x29, MRMDestMem, (outs), (ins f128mem:$dst, VR128:$src),
|
||||
|
||||
def MOVUPSrr : PSI<0x10, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"movups\t{$src, $dst|$dst, $src}", []>;
|
||||
let isLoad = 1 in
|
||||
def MOVUPSrm : PSI<0x10, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src),
|
||||
"movups\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst, (loadv4f32 addr:$src))]>;
|
||||
@ -605,6 +607,7 @@ def MOVUPSmr : PSI<0x11, MRMDestMem, (outs), (ins f128mem:$dst, VR128:$src),
|
||||
[(store (v4f32 VR128:$src), addr:$dst)]>;
|
||||
|
||||
// Intrinsic forms of MOVUPS load and store
|
||||
let isLoad = 1 in
|
||||
def MOVUPSrm_Int : PSI<0x10, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src),
|
||||
"movups\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst, (int_x86_sse_loadu_ps addr:$src))]>;
|
||||
@ -954,7 +957,7 @@ def MOVZSS2PSrm : SSI<0x10, MRMSrcMem, (outs VR128:$dst), (ins f32mem:$src),
|
||||
// Move Instructions
|
||||
def MOVSDrr : SDI<0x10, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src),
|
||||
"movsd\t{$src, $dst|$dst, $src}", []>;
|
||||
let isReMaterializable = 1 in
|
||||
let isLoad = 1, isReMaterializable = 1 in
|
||||
def MOVSDrm : SDI<0x10, MRMSrcMem, (outs FR64:$dst), (ins f64mem:$src),
|
||||
"movsd\t{$src, $dst|$dst, $src}",
|
||||
[(set FR64:$dst, (loadf64 addr:$src))]>;
|
||||
@ -1071,6 +1074,7 @@ def FsMOVAPDrr : PDI<0x28, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src),
|
||||
|
||||
// Alias instruction to load FR64 from f128mem using movapd. Upper bits are
|
||||
// disregarded.
|
||||
let isLoad = 1 in
|
||||
def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins f128mem:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}",
|
||||
[(set FR64:$dst, (alignedloadfsf64 addr:$src))]>;
|
||||
@ -1247,7 +1251,7 @@ defm MIN : sse2_fp_binop_rm<0x5D, "min", X86fmin,
|
||||
// Move Instructions
|
||||
def MOVAPDrr : PDI<0x28, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}", []>;
|
||||
let isReMaterializable = 1 in
|
||||
let isLoad = 1, isReMaterializable = 1 in
|
||||
def MOVAPDrm : PDI<0x28, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src),
|
||||
"movapd\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst, (alignedloadv2f64 addr:$src))]>;
|
||||
@ -1258,6 +1262,7 @@ def MOVAPDmr : PDI<0x29, MRMDestMem, (outs), (ins f128mem:$dst, VR128:$src),
|
||||
|
||||
def MOVUPDrr : PDI<0x10, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"movupd\t{$src, $dst|$dst, $src}", []>;
|
||||
let isLoad = 1 in
|
||||
def MOVUPDrm : PDI<0x10, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src),
|
||||
"movupd\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst, (loadv2f64 addr:$src))]>;
|
||||
@ -1620,12 +1625,14 @@ let isTwoAddress = 1 in {
|
||||
// Move Instructions
|
||||
def MOVDQArr : PDI<0x6F, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src),
|
||||
"movdqa\t{$src, $dst|$dst, $src}", []>;
|
||||
let isLoad = 1 in
|
||||
def MOVDQArm : PDI<0x6F, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src),
|
||||
"movdqa\t{$src, $dst|$dst, $src}",
|
||||
[/*(set VR128:$dst, (alignedloadv2i64 addr:$src))*/]>;
|
||||
def MOVDQAmr : PDI<0x7F, MRMDestMem, (outs), (ins i128mem:$dst, VR128:$src),
|
||||
"movdqa\t{$src, $dst|$dst, $src}",
|
||||
[/*(alignedstore (v2i64 VR128:$src), addr:$dst)*/]>;
|
||||
let isLoad = 1 in
|
||||
def MOVDQUrm : I<0x6F, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src),
|
||||
"movdqu\t{$src, $dst|$dst, $src}",
|
||||
[/*(set VR128:$dst, (loadv2i64 addr:$src))*/]>,
|
||||
@ -1636,6 +1643,7 @@ def MOVDQUmr : I<0x7F, MRMDestMem, (outs), (ins i128mem:$dst, VR128:$src),
|
||||
XS, Requires<[HasSSE2]>;
|
||||
|
||||
// Intrinsic forms of MOVDQU load and store
|
||||
let isLoad = 1 in
|
||||
def MOVDQUrm_Int : I<0x6F, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src),
|
||||
"movdqu\t{$src, $dst|$dst, $src}",
|
||||
[(set VR128:$dst, (int_x86_sse2_loadu_dq addr:$src))]>,
|
||||
|
@ -163,6 +163,7 @@ def MOV64ri32 : RIi32<0xC7, MRM0r, (outs GR64:$dst), (ins i64i32imm:$src),
|
||||
"mov{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, i64immSExt32:$src)]>;
|
||||
|
||||
let isLoad = 1 in
|
||||
def MOV64rm : RI<0x8B, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src),
|
||||
"mov{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (load addr:$src))]>;
|
||||
|
Loading…
x
Reference in New Issue
Block a user