Subzero: Fix mid-line comments when using -asm-verbose .
The llvm-mc assembler for x86 uses '#' to start a mid-line comment, while arm32 uses '@'. Those characters cause syntax errors for the other architecture. There doesn't seem to be a common character for starting mid-line comments.
However, the /* ... */ style comment works in both (all?) cases.
(The '#' character at the start of a line, preceded by optional whitespace, starts a comment in both cases.)
BUG= none
TEST= ./pydir/szbuild_spec2k.py --force -v -O2 --filetype=asm --sz=--asm-verbose --target=arm32
TEST= ./pydir/szbuild_spec2k.py --force -v -O2 --filetype=asm --sz=--asm-verbose --target=x8632
R=kschimpf@google.com
Review URL: https://codereview.chromium.org/1521863002 .
diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp
index 70c6347..1e9a70d 100644
--- a/src/IceTargetLoweringARM32.cpp
+++ b/src/IceTargetLoweringARM32.cpp
@@ -6328,7 +6328,7 @@
Str << ":\n\t" << Traits::AsmTag << "\t0x";
T Value = Const->getValue();
Str.write_hex(Traits::bitcastToUint64(Value));
- Str << "\t@" << Traits::TypeName << " " << Value << "\n";
+ Str << "\t/* " << Traits::TypeName << " " << Value << " */\n";
}
template <typename T> void emitConstantPool(GlobalContext *Ctx) {