mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Extract the lower 64-bit if a MMX value is passed in a XMM register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50292 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
082948df9b
commit
44c0fd17e1
@ -1248,9 +1248,15 @@ X86TargetLowering::LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG) {
|
||||
ArgValue = DAG.getNode(ISD::TRUNCATE, VA.getValVT(), ArgValue);
|
||||
|
||||
// Handle MMX values passed in GPRs.
|
||||
if (Is64Bit && RegVT != VA.getLocVT() && RC == X86::GR64RegisterClass &&
|
||||
MVT::getSizeInBits(RegVT) == 64)
|
||||
ArgValue = DAG.getNode(ISD::BIT_CONVERT, VA.getLocVT(), ArgValue);
|
||||
if (Is64Bit && RegVT != VA.getLocVT()) {
|
||||
if (MVT::getSizeInBits(RegVT) == 64 && RC == X86::GR64RegisterClass)
|
||||
ArgValue = DAG.getNode(ISD::BIT_CONVERT, VA.getLocVT(), ArgValue);
|
||||
else if (RC == X86::VR128RegisterClass) {
|
||||
ArgValue = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, MVT::i64, ArgValue,
|
||||
DAG.getConstant(0, MVT::i64));
|
||||
ArgValue = DAG.getNode(ISD::BIT_CONVERT, VA.getLocVT(), ArgValue);
|
||||
}
|
||||
}
|
||||
|
||||
ArgValues.push_back(ArgValue);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user