mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
Comments on JumpTableness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb1518585b
commit
16113431e8
@ -2403,6 +2403,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
|
||||
case ISD::GlobalAddress: return "GlobalAddress";
|
||||
case ISD::FrameIndex: return "FrameIndex";
|
||||
case ISD::JumpTable: return "JumpTable";
|
||||
case ISD::JumpTableRelocBase: return "JumpTableRelocBase";
|
||||
case ISD::ConstantPool: return "ConstantPool";
|
||||
case ISD::ExternalSymbol: return "ExternalSymbol";
|
||||
case ISD::INTRINSIC_WO_CHAIN: {
|
||||
|
@ -868,6 +868,9 @@ void SelectionDAGLowering::visitJumpTable(SelectionDAGISel::JumpTable &JT) {
|
||||
SDOperand LD = DAG.getLoad(isPIC ? MVT::i32 : PTy, Copy.getValue(1), ADD,
|
||||
DAG.getSrcValue(0));
|
||||
if (isPIC) {
|
||||
// For Pic, the sequence is:
|
||||
// BRIND(load(Jumptable + index) + RelocBase)
|
||||
// RelocBase is the JumpTable on PPC and X86, GOT on Alpha
|
||||
SDOperand Reloc = DAG.getNode(ISD::JumpTableRelocBase, PTy, TAB);
|
||||
ADD = DAG.getNode(ISD::ADD, PTy,
|
||||
((PTy != MVT::i32) ? DAG.getNode(ISD::SIGN_EXTEND, PTy, LD) : LD), Reloc);
|
||||
|
Loading…
Reference in New Issue
Block a user