From 3fbd67898e365f12436564a52d8995a4aeb4ef89 Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Mon, 18 Sep 2006 17:59:35 +0000 Subject: [PATCH] absolute addresses must match pointer size git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30461 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter.cpp | 1 + lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index f6b4bfcbfe3..72650ba183c 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -714,6 +714,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { if (OpNo >= MI->getNumOperands()) { Error = true; + std::cerr << "Too many operands\n"; } else { unsigned OpFlags = MI->getOperand(OpNo).getImmedValue(); ++OpNo; // Skip over the ID number. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c9b8f60e777..6515c9931f8 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -866,7 +866,7 @@ void SelectionDAGLowering::visitJumpTable(SelectionDAGISel::JumpTable &JT) { DAG.getConstant(EntrySize, PTy)); SDOperand TAB = DAG.getJumpTable(JT.JTI,PTy); SDOperand ADD = DAG.getNode(ISD::ADD, PTy, IDX, TAB); - SDOperand LD = DAG.getLoad(MVT::i32, Copy.getValue(1), ADD, + SDOperand LD = DAG.getLoad(PTy, Copy.getValue(1), ADD, DAG.getSrcValue(0)); if (TLI.getTargetMachine().getRelocationModel() == Reloc::PIC_) { ADD = DAG.getNode(ISD::ADD, PTy, -- 2.34.1