mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Support new 'any' support for pointer size and endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d445c6b64a
commit
eb5d3a1526
@ -553,9 +553,17 @@ void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType,
|
|||||||
|
|
||||||
|
|
||||||
void AssemblyWriter::printModule(const Module *M) {
|
void AssemblyWriter::printModule(const Module *M) {
|
||||||
Out << "target endian = " << (M->isLittleEndian() ? "little" : "big") << "\n";
|
switch (M->getEndianness()) {
|
||||||
Out << "target pointersize = " << (M->has32BitPointers() ? 32 : 64) << "\n";
|
case Module::LittleEndian: Out << "target endian = little\n"; break;
|
||||||
|
case Module::BigEndian: Out << "target endian = big\n"; break;
|
||||||
|
case Module::AnyEndianness: break;
|
||||||
|
}
|
||||||
|
switch (M->getPointerSize()) {
|
||||||
|
case Module::Pointer32: Out << "target pointersize = 32\n"; break;
|
||||||
|
case Module::Pointer64: Out << "target pointersize = 64\n"; break;
|
||||||
|
case Module::AnyPointerSize: break;
|
||||||
|
}
|
||||||
|
|
||||||
// Loop over the symbol table, emitting all named constants...
|
// Loop over the symbol table, emitting all named constants...
|
||||||
printSymbolTable(M->getSymbolTable());
|
printSymbolTable(M->getSymbolTable());
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ struct GlobalValueRefMap {
|
|||||||
|
|
||||||
|
|
||||||
Module::Module(const std::string &MID)
|
Module::Module(const std::string &MID)
|
||||||
: ModuleID(MID), Endian(BigEndian), PtrSize(Pointer64) {
|
: ModuleID(MID), Endian(AnyEndianness), PtrSize(AnyPointerSize) {
|
||||||
FunctionList.setItemParent(this);
|
FunctionList.setItemParent(this);
|
||||||
FunctionList.setParent(this);
|
FunctionList.setParent(this);
|
||||||
GlobalList.setItemParent(this);
|
GlobalList.setItemParent(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user