mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
Fix PR11985
- BlockAddress has no support of BA + offset form and there is no way to propagate that offset into machine operand; - Add BA + offset support and a new interface 'getTargetBlockAddress' to simplify target block address forming; - All targets are modified to use new interface and X86 backend is enhanced to support BA + offset addressing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7368,9 +7368,10 @@ X86TargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const {
|
||||
Subtarget->ClassifyBlockAddressReference();
|
||||
CodeModel::Model M = getTargetMachine().getCodeModel();
|
||||
const BlockAddress *BA = cast<BlockAddressSDNode>(Op)->getBlockAddress();
|
||||
int64_t Offset = cast<BlockAddressSDNode>(Op)->getOffset();
|
||||
DebugLoc dl = Op.getDebugLoc();
|
||||
SDValue Result = DAG.getBlockAddress(BA, getPointerTy(),
|
||||
/*isTarget=*/true, OpFlags);
|
||||
SDValue Result = DAG.getTargetBlockAddress(BA, getPointerTy(), Offset,
|
||||
OpFlags);
|
||||
|
||||
if (Subtarget->isPICStyleRIPRel() &&
|
||||
(M == CodeModel::Small || M == CodeModel::Kernel))
|
||||
|
||||
Reference in New Issue
Block a user