mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Make identity default, and fix PR1020
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31979 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b5ebf15b2b
commit
85f2228454
@ -2265,10 +2265,6 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) {
|
|||||||
|
|
||||||
assert(c.Codes.size() == 1 && "Too many asm constraint codes to handle");
|
assert(c.Codes.size() == 1 && "Too many asm constraint codes to handle");
|
||||||
|
|
||||||
//catch numeric constraints
|
|
||||||
if (c.Codes[0].find_first_not_of("0123456789") >= c.Codes[0].size())
|
|
||||||
return c.Codes[0];
|
|
||||||
|
|
||||||
const char** table = 0;
|
const char** table = 0;
|
||||||
|
|
||||||
//Grab the translation table from TargetAsmInfo if it exists
|
//Grab the translation table from TargetAsmInfo if it exists
|
||||||
@ -2291,8 +2287,8 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) {
|
|||||||
if (c.Codes[0] == table[i])
|
if (c.Codes[0] == table[i])
|
||||||
return table[i+1];
|
return table[i+1];
|
||||||
|
|
||||||
assert(0 && "Unknown Asm Constraint");
|
//default is identity
|
||||||
return "";
|
return c.Codes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: import logic from AsmPrinter.cpp
|
//TODO: import logic from AsmPrinter.cpp
|
||||||
@ -2383,7 +2379,7 @@ void CWriter::visitInlineAsm(CallInst &CI) {
|
|||||||
if (I + 1 != E)
|
if (I + 1 != E)
|
||||||
Out << ",";
|
Out << ",";
|
||||||
}
|
}
|
||||||
Out << "\n :" << Clobber.substr(1) << ")\n";
|
Out << "\n :" << (Clobber.size() ? Clobber.substr(1) : "") << ")\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWriter::visitMallocInst(MallocInst &I) {
|
void CWriter::visitMallocInst(MallocInst &I) {
|
||||||
|
@ -2265,10 +2265,6 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) {
|
|||||||
|
|
||||||
assert(c.Codes.size() == 1 && "Too many asm constraint codes to handle");
|
assert(c.Codes.size() == 1 && "Too many asm constraint codes to handle");
|
||||||
|
|
||||||
//catch numeric constraints
|
|
||||||
if (c.Codes[0].find_first_not_of("0123456789") >= c.Codes[0].size())
|
|
||||||
return c.Codes[0];
|
|
||||||
|
|
||||||
const char** table = 0;
|
const char** table = 0;
|
||||||
|
|
||||||
//Grab the translation table from TargetAsmInfo if it exists
|
//Grab the translation table from TargetAsmInfo if it exists
|
||||||
@ -2291,8 +2287,8 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) {
|
|||||||
if (c.Codes[0] == table[i])
|
if (c.Codes[0] == table[i])
|
||||||
return table[i+1];
|
return table[i+1];
|
||||||
|
|
||||||
assert(0 && "Unknown Asm Constraint");
|
//default is identity
|
||||||
return "";
|
return c.Codes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: import logic from AsmPrinter.cpp
|
//TODO: import logic from AsmPrinter.cpp
|
||||||
@ -2383,7 +2379,7 @@ void CWriter::visitInlineAsm(CallInst &CI) {
|
|||||||
if (I + 1 != E)
|
if (I + 1 != E)
|
||||||
Out << ",";
|
Out << ",";
|
||||||
}
|
}
|
||||||
Out << "\n :" << Clobber.substr(1) << ")\n";
|
Out << "\n :" << (Clobber.size() ? Clobber.substr(1) : "") << ")\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWriter::visitMallocInst(MallocInst &I) {
|
void CWriter::visitMallocInst(MallocInst &I) {
|
||||||
|
Loading…
Reference in New Issue
Block a user