mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 19:32:16 +00:00
fix a bunch of regressions due to call behavior
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f64ea9d122
commit
3e31592dca
@ -862,14 +862,14 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
|||||||
if (GlobalAddressSDNode *GASD =
|
if (GlobalAddressSDNode *GASD =
|
||||||
dyn_cast<GlobalAddressSDNode>(N.getOperand(1)))
|
dyn_cast<GlobalAddressSDNode>(N.getOperand(1)))
|
||||||
{
|
{
|
||||||
if (GASD->getGlobal()->isExternal()) {
|
//if (GASD->getGlobal()->isExternal()) {
|
||||||
//use safe calling convention
|
//use safe calling convention
|
||||||
AlphaLowering.restoreGP(BB);
|
AlphaLowering.restoreGP(BB);
|
||||||
BuildMI(BB, Alpha::CALL, 1).addGlobalAddress(GASD->getGlobal(),true);
|
BuildMI(BB, Alpha::CALL, 1).addGlobalAddress(GASD->getGlobal(),true);
|
||||||
} else {
|
//} else {
|
||||||
//use PC relative branch call
|
//use PC relative branch call
|
||||||
BuildMI(BB, Alpha::BSR, 1, Alpha::R26).addGlobalAddress(GASD->getGlobal(),true);
|
//BuildMI(BB, Alpha::BSR, 1, Alpha::R26).addGlobalAddress(GASD->getGlobal(),true);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
else if (ExternalSymbolSDNode *ESSDN =
|
else if (ExternalSymbolSDNode *ESSDN =
|
||||||
dyn_cast<ExternalSymbolSDNode>(N.getOperand(1)))
|
dyn_cast<ExternalSymbolSDNode>(N.getOperand(1)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user