forked from OSchip/llvm-project
parent
50712a456d
commit
53c2b1ea59
|
@ -959,14 +959,6 @@ class AsmWriter {
|
|||
// == 1, will expand to "y".
|
||||
int Variant = 0;
|
||||
|
||||
|
||||
// FirstOperandColumn/OperandSpacing - If the assembler syntax uses a columnar
|
||||
// layout, the asmwriter can actually generate output in this columns (in
|
||||
// verbose-asm mode). These two values indicate the width of the first column
|
||||
// (the "opcode" area) and the width to reserve for subsequent operands. When
|
||||
// verbose asm mode is enabled, operands will be indented to respect this.
|
||||
int FirstOperandColumn = -1;
|
||||
|
||||
// OperandSpacing - Space between operand columns.
|
||||
int OperandSpacing = -1;
|
||||
|
||||
|
|
|
@ -987,7 +987,6 @@ AsmWriterEmitter::AsmWriterEmitter(RecordKeeper &R) : Records(R), Target(R) {
|
|||
if (!(*I)->AsmString.empty() && (*I)->TheDef->getName() != "PHI")
|
||||
Instructions.push_back(
|
||||
AsmWriterInst(**I, AsmWriter->getValueAsInt("Variant"),
|
||||
AsmWriter->getValueAsInt("FirstOperandColumn"),
|
||||
AsmWriter->getValueAsInt("OperandSpacing")));
|
||||
|
||||
// Get the instruction numbering.
|
||||
|
|
|
@ -50,14 +50,9 @@ std::string AsmWriterOperand::getCode() const {
|
|||
///
|
||||
AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI,
|
||||
unsigned Variant,
|
||||
int FirstOperandColumn,
|
||||
int OperandSpacing) {
|
||||
this->CGI = &CGI;
|
||||
|
||||
// This is the number of tabs we've seen if we're doing columnar layout.
|
||||
unsigned CurColumn = 0;
|
||||
|
||||
|
||||
// NOTE: Any extensions to this code need to be mirrored in the
|
||||
// AsmPrinter::printInlineAsm code that executes as compile time (assuming
|
||||
// that inline asm strings should also get the new feature)!
|
||||
|
@ -76,20 +71,7 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI,
|
|||
AddLiteralString("\\n");
|
||||
break;
|
||||
case '\t':
|
||||
// If the asm writer is not using a columnar layout, \t is not
|
||||
// magic.
|
||||
if (FirstOperandColumn == -1 || OperandSpacing == -1) {
|
||||
AddLiteralString("\\t");
|
||||
} else {
|
||||
// We recognize a tab as an operand delimeter.
|
||||
unsigned DestColumn = FirstOperandColumn +
|
||||
CurColumn++ * OperandSpacing;
|
||||
Operands.push_back(
|
||||
AsmWriterOperand(
|
||||
"O.PadToColumn(" +
|
||||
utostr(DestColumn) + ");\n",
|
||||
AsmWriterOperand::isLiteralStatementOperand));
|
||||
}
|
||||
AddLiteralString("\\t");
|
||||
break;
|
||||
case '"':
|
||||
AddLiteralString("\\\"");
|
||||
|
@ -106,20 +88,7 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI,
|
|||
if (AsmString[DollarPos+1] == 'n') {
|
||||
AddLiteralString("\\n");
|
||||
} else if (AsmString[DollarPos+1] == 't') {
|
||||
// If the asm writer is not using a columnar layout, \t is not
|
||||
// magic.
|
||||
if (FirstOperandColumn == -1 || OperandSpacing == -1) {
|
||||
AddLiteralString("\\t");
|
||||
break;
|
||||
}
|
||||
|
||||
// We recognize a tab as an operand delimeter.
|
||||
unsigned DestColumn = FirstOperandColumn +
|
||||
CurColumn++ * OperandSpacing;
|
||||
Operands.push_back(
|
||||
AsmWriterOperand("O.PadToColumn(" + utostr(DestColumn) + ");\n",
|
||||
AsmWriterOperand::isLiteralStatementOperand));
|
||||
break;
|
||||
AddLiteralString("\\t");
|
||||
} else if (std::string("${|}\\").find(AsmString[DollarPos+1])
|
||||
!= std::string::npos) {
|
||||
AddLiteralString(std::string(1, AsmString[DollarPos+1]));
|
||||
|
|
|
@ -89,7 +89,6 @@ namespace llvm {
|
|||
|
||||
AsmWriterInst(const CodeGenInstruction &CGI,
|
||||
unsigned Variant,
|
||||
int FirstOperandColumn,
|
||||
int OperandSpacing);
|
||||
|
||||
/// MatchesAllButOneOp - If this instruction is exactly identical to the
|
||||
|
|
Loading…
Reference in New Issue