mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 15:33:33 +00:00
f64 <-> i64 bit_convert using movq in 64-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32587 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a80b7833e3
commit
21b76123e5
@ -158,10 +158,6 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
|
|||||||
setOperationAction(ISD::BIT_CONVERT , MVT::f32 , Expand);
|
setOperationAction(ISD::BIT_CONVERT , MVT::f32 , Expand);
|
||||||
setOperationAction(ISD::BIT_CONVERT , MVT::i32 , Expand);
|
setOperationAction(ISD::BIT_CONVERT , MVT::i32 , Expand);
|
||||||
}
|
}
|
||||||
if (Subtarget->is64Bit()) {
|
|
||||||
setOperationAction(ISD::BIT_CONVERT , MVT::f64 , Expand);
|
|
||||||
setOperationAction(ISD::BIT_CONVERT , MVT::i64 , Expand);
|
|
||||||
}
|
|
||||||
|
|
||||||
setOperationAction(ISD::BR_JT , MVT::Other, Expand);
|
setOperationAction(ISD::BR_JT , MVT::Other, Expand);
|
||||||
setOperationAction(ISD::BRCOND , MVT::Other, Custom);
|
setOperationAction(ISD::BRCOND , MVT::Other, Custom);
|
||||||
|
@ -1126,3 +1126,17 @@ def MOVPQIto64mr : RPDI<0x7E, MRMDestMem, (ops i64mem:$dst, VR128:$src),
|
|||||||
"movq {$src, $dst|$dst, $src}",
|
"movq {$src, $dst|$dst, $src}",
|
||||||
[(store (i64 (vector_extract (v2i64 VR128:$src),
|
[(store (i64 (vector_extract (v2i64 VR128:$src),
|
||||||
(iPTR 0))), addr:$dst)]>;
|
(iPTR 0))), addr:$dst)]>;
|
||||||
|
|
||||||
|
def MOV64toSDrr : RPDI<0x6E, MRMSrcReg, (ops FR64:$dst, GR64:$src),
|
||||||
|
"movq {$src, $dst|$dst, $src}",
|
||||||
|
[(set FR64:$dst, (bitconvert GR64:$src))]>;
|
||||||
|
def MOV64toSDrm : RPDI<0x6E, MRMSrcMem, (ops FR64:$dst, i64mem:$src),
|
||||||
|
"movq {$src, $dst|$dst, $src}",
|
||||||
|
[(set FR64:$dst, (bitconvert (loadi64 addr:$src)))]>;
|
||||||
|
|
||||||
|
def MOVSDto64rr : RPDI<0x7E, MRMDestReg, (ops GR64:$dst, FR64:$src),
|
||||||
|
"movq {$src, $dst|$dst, $src}",
|
||||||
|
[(set GR64:$dst, (bitconvert FR64:$src))]>;
|
||||||
|
def MOVSDto64mr : RPDI<0x7E, MRMDestMem, (ops i64mem:$dst, FR64:$src),
|
||||||
|
"movq {$src, $dst|$dst, $src}",
|
||||||
|
[(store (i64 (bitconvert FR64:$src)), addr:$dst)]>;
|
||||||
|
@ -511,6 +511,7 @@ MachineInstr* X86RegisterInfo::foldMemoryOperand(MachineInstr *MI,
|
|||||||
{ X86::MOVPQIto64rr,X86::MOVPQIto64mr },
|
{ X86::MOVPQIto64rr,X86::MOVPQIto64mr },
|
||||||
{ X86::MOVPS2SSrr, X86::MOVPS2SSmr },
|
{ X86::MOVPS2SSrr, X86::MOVPS2SSmr },
|
||||||
{ X86::MOVSDrr, X86::MOVSDmr },
|
{ X86::MOVSDrr, X86::MOVSDmr },
|
||||||
|
{ X86::MOVSDto64rr, X86::MOVSDto64mr },
|
||||||
{ X86::MOVSS2DIrr, X86::MOVSS2DImr },
|
{ X86::MOVSS2DIrr, X86::MOVSS2DImr },
|
||||||
{ X86::MOVSSrr, X86::MOVSSmr },
|
{ X86::MOVSSrr, X86::MOVSSmr },
|
||||||
{ X86::MOVUPDrr, X86::MOVUPDmr },
|
{ X86::MOVUPDrr, X86::MOVUPDmr },
|
||||||
@ -608,6 +609,7 @@ MachineInstr* X86RegisterInfo::foldMemoryOperand(MachineInstr *MI,
|
|||||||
{ X86::MOV32rr, X86::MOV32rm },
|
{ X86::MOV32rr, X86::MOV32rm },
|
||||||
{ X86::MOV64rr, X86::MOV64rm },
|
{ X86::MOV64rr, X86::MOV64rm },
|
||||||
{ X86::MOV64toPQIrr, X86::MOV64toPQIrm },
|
{ X86::MOV64toPQIrr, X86::MOV64toPQIrm },
|
||||||
|
{ X86::MOV64toSDrr, X86::MOV64toSDrm },
|
||||||
{ X86::MOV8rr, X86::MOV8rm },
|
{ X86::MOV8rr, X86::MOV8rm },
|
||||||
{ X86::MOVAPDrr, X86::MOVAPDrm },
|
{ X86::MOVAPDrr, X86::MOVAPDrm },
|
||||||
{ X86::MOVAPSrr, X86::MOVAPSrm },
|
{ X86::MOVAPSrr, X86::MOVAPSrm },
|
||||||
|
Loading…
Reference in New Issue
Block a user