mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Make the EDis tables const.
llvm-svn: 150304
This commit is contained in:
parent
675a84a6ea
commit
44e872829d
@ -90,7 +90,7 @@ public:
|
|||||||
/// @return - An array of instruction information, with one entry for
|
/// @return - An array of instruction information, with one entry for
|
||||||
/// each MCInst opcode this disassembler returns.
|
/// each MCInst opcode this disassembler returns.
|
||||||
/// NULL if there is no info for this target.
|
/// NULL if there is no info for this target.
|
||||||
virtual EDInstInfo *getEDInfo() const { return (EDInstInfo*)0; }
|
virtual const EDInstInfo *getEDInfo() const { return (EDInstInfo*)0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//
|
//
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
raw_ostream &cStream) const;
|
raw_ostream &cStream) const;
|
||||||
|
|
||||||
/// getEDInfo - See MCDisassembler.
|
/// getEDInfo - See MCDisassembler.
|
||||||
EDInstInfo *getEDInfo() const;
|
const EDInstInfo *getEDInfo() const;
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
raw_ostream &cStream) const;
|
raw_ostream &cStream) const;
|
||||||
|
|
||||||
/// getEDInfo - See MCDisassembler.
|
/// getEDInfo - See MCDisassembler.
|
||||||
EDInstInfo *getEDInfo() const;
|
const EDInstInfo *getEDInfo() const;
|
||||||
private:
|
private:
|
||||||
mutable std::vector<unsigned> ITBlock;
|
mutable std::vector<unsigned> ITBlock;
|
||||||
DecodeStatus AddThumbPredicate(MCInst&) const;
|
DecodeStatus AddThumbPredicate(MCInst&) const;
|
||||||
@ -332,11 +332,11 @@ static MCDisassembler *createThumbDisassembler(const Target &T, const MCSubtarge
|
|||||||
return new ThumbDisassembler(STI);
|
return new ThumbDisassembler(STI);
|
||||||
}
|
}
|
||||||
|
|
||||||
EDInstInfo *ARMDisassembler::getEDInfo() const {
|
const EDInstInfo *ARMDisassembler::getEDInfo() const {
|
||||||
return instInfoARM;
|
return instInfoARM;
|
||||||
}
|
}
|
||||||
|
|
||||||
EDInstInfo *ThumbDisassembler::getEDInfo() const {
|
const EDInstInfo *ThumbDisassembler::getEDInfo() const {
|
||||||
return instInfoARM;
|
return instInfoARM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ static unsigned getOPCODE(uint32_t insn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EDInstInfo *MBlazeDisassembler::getEDInfo() const {
|
const EDInstInfo *MBlazeDisassembler::getEDInfo() const {
|
||||||
return instInfoMBlaze;
|
return instInfoMBlaze;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
raw_ostream &cStream) const;
|
raw_ostream &cStream) const;
|
||||||
|
|
||||||
/// getEDInfo - See MCDisassembler.
|
/// getEDInfo - See MCDisassembler.
|
||||||
EDInstInfo *getEDInfo() const;
|
const EDInstInfo *getEDInfo() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace llvm
|
} // namespace llvm
|
||||||
|
@ -82,7 +82,7 @@ X86GenericDisassembler::~X86GenericDisassembler() {
|
|||||||
delete MII;
|
delete MII;
|
||||||
}
|
}
|
||||||
|
|
||||||
EDInstInfo *X86GenericDisassembler::getEDInfo() const {
|
const EDInstInfo *X86GenericDisassembler::getEDInfo() const {
|
||||||
return instInfoX86;
|
return instInfoX86;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ public:
|
|||||||
raw_ostream &cStream) const;
|
raw_ostream &cStream) const;
|
||||||
|
|
||||||
/// getEDInfo - See MCDisassembler.
|
/// getEDInfo - See MCDisassembler.
|
||||||
EDInstInfo *getEDInfo() const;
|
const EDInstInfo *getEDInfo() const;
|
||||||
private:
|
private:
|
||||||
DisassemblerMode fMode;
|
DisassemblerMode fMode;
|
||||||
};
|
};
|
||||||
|
@ -980,11 +980,7 @@ void EDEmitter::run(raw_ostream &o) {
|
|||||||
|
|
||||||
emitCommonEnums(o, i);
|
emitCommonEnums(o, i);
|
||||||
|
|
||||||
o << "namespace {\n";
|
o << "static const llvm::EDInstInfo instInfo" << target.getName() << "[] = ";
|
||||||
|
|
||||||
o << "llvm::EDInstInfo instInfo" << target.getName().c_str() << "[] = ";
|
|
||||||
infoArray.emit(o, i);
|
infoArray.emit(o, i);
|
||||||
o << ";" << "\n";
|
o << ";" << "\n";
|
||||||
|
|
||||||
o << "}\n";
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user