mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Fix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
instructions for calls since BL and BLX are always 32-bit long and BX is always 16-bit long. Also, we should be using BLX to call external function stubs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -263,7 +263,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
|
||||
} else {
|
||||
setOperationAction(ISD::MUL, MVT::i64, Expand);
|
||||
setOperationAction(ISD::MULHU, MVT::i32, Expand);
|
||||
if (!Subtarget->isThumb1Only() && !Subtarget->hasV6Ops())
|
||||
if (!Subtarget->hasV6Ops())
|
||||
setOperationAction(ISD::MULHS, MVT::i32, Expand);
|
||||
}
|
||||
setOperationAction(ISD::SHL_PARTS, MVT::i32, Expand);
|
||||
@@ -985,8 +985,8 @@ SDValue ARMTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG) {
|
||||
|
||||
// FIXME: handle tail calls differently.
|
||||
unsigned CallOpc;
|
||||
if (Subtarget->isThumb1Only()) {
|
||||
if (!Subtarget->hasV5TOps() && (!isDirect || isARMFunc))
|
||||
if (Subtarget->isThumb()) {
|
||||
if ((!isDirect || isARMFunc) && !Subtarget->hasV5TOps())
|
||||
CallOpc = ARMISD::CALL_NOLINK;
|
||||
else
|
||||
CallOpc = isARMFunc ? ARMISD::CALL : ARMISD::tCALL;
|
||||
|
Reference in New Issue
Block a user