mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Just use BL all the time. It's safer that way.
Fixes rdar://9184526 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128869 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1690,17 +1690,9 @@ bool ARMFastISel::SelectRet(const Instruction *I) {
|
|||||||
|
|
||||||
unsigned ARMFastISel::ARMSelectCallOp(const GlobalValue *GV) {
|
unsigned ARMFastISel::ARMSelectCallOp(const GlobalValue *GV) {
|
||||||
|
|
||||||
// Depend our opcode for thumb on whether or not we're targeting an
|
|
||||||
// externally callable function. For libcalls we'll just pass a NULL GV
|
|
||||||
// in here.
|
|
||||||
bool isExternal = false;
|
|
||||||
if (!GV || GV->hasExternalLinkage()) isExternal = true;
|
|
||||||
|
|
||||||
// Darwin needs the r9 versions of the opcodes.
|
// Darwin needs the r9 versions of the opcodes.
|
||||||
bool isDarwin = Subtarget->isTargetDarwin();
|
bool isDarwin = Subtarget->isTargetDarwin();
|
||||||
if (isThumb && isExternal) {
|
if (isThumb) {
|
||||||
return isDarwin ? ARM::tBLXi_r9 : ARM::tBLXi;
|
|
||||||
} else if (isThumb) {
|
|
||||||
return isDarwin ? ARM::tBLr9 : ARM::tBL;
|
return isDarwin ? ARM::tBLr9 : ARM::tBL;
|
||||||
} else {
|
} else {
|
||||||
return isDarwin ? ARM::BLr9 : ARM::BL;
|
return isDarwin ? ARM::BLr9 : ARM::BL;
|
||||||
|
|||||||
Reference in New Issue
Block a user