mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
add TargetExternalSymbol
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -111,6 +111,7 @@ public:
|
||||
SDOperand getTargetConstantPool(Constant *C, MVT::ValueType VT);
|
||||
SDOperand getBasicBlock(MachineBasicBlock *MBB);
|
||||
SDOperand getExternalSymbol(const char *Sym, MVT::ValueType VT);
|
||||
SDOperand getTargetExternalSymbol(const char *Sym, MVT::ValueType VT);
|
||||
SDOperand getValueType(MVT::ValueType);
|
||||
SDOperand getRegister(unsigned Reg, MVT::ValueType VT);
|
||||
|
||||
@@ -382,6 +383,7 @@ private:
|
||||
std::map<MachineBasicBlock *, SDNode*> BBNodes;
|
||||
std::vector<SDNode*> ValueTypeNodes;
|
||||
std::map<std::string, SDNode*> ExternalSymbols;
|
||||
std::map<std::string, SDNode*> TargetExternalSymbols;
|
||||
std::map<std::pair<unsigned,
|
||||
std::pair<MVT::ValueType, std::vector<SDOperand> > >,
|
||||
SDNode*> OneResultNodes;
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace ISD {
|
||||
TargetGlobalAddress,
|
||||
TargetFrameIndex,
|
||||
TargetConstantPool,
|
||||
TargetExternalSymbol,
|
||||
|
||||
// CopyToReg - This node has three operands: a chain, a register number to
|
||||
// set to this value, and a value.
|
||||
@@ -932,8 +933,9 @@ class ExternalSymbolSDNode : public SDNode {
|
||||
const char *Symbol;
|
||||
protected:
|
||||
friend class SelectionDAG;
|
||||
ExternalSymbolSDNode(const char *Sym, MVT::ValueType VT)
|
||||
: SDNode(ISD::ExternalSymbol, VT), Symbol(Sym) {
|
||||
ExternalSymbolSDNode(bool isTarget, const char *Sym, MVT::ValueType VT)
|
||||
: SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, VT),
|
||||
Symbol(Sym) {
|
||||
}
|
||||
public:
|
||||
|
||||
@@ -941,7 +943,8 @@ public:
|
||||
|
||||
static bool classof(const ExternalSymbolSDNode *) { return true; }
|
||||
static bool classof(const SDNode *N) {
|
||||
return N->getOpcode() == ISD::ExternalSymbol;
|
||||
return N->getOpcode() == ISD::ExternalSymbol ||
|
||||
N->getOpcode() == ISD::TargetExternalSymbol;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user