This allows using semicolons for bundling up more than one
statement per line. This is used within the mingw-w64 project in some
assembly files that contain code for multiple architectures.
Differential Revision: https://reviews.llvm.org/D36366
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310797
91177308-0d34-0410-b5e6-
96231b3b80d8
}
AArch64MCAsmInfoCOFF::AArch64MCAsmInfoCOFF() {
- CommentString = ";";
PrivateGlobalPrefix = ".L";
PrivateLabelPrefix = ".L";
AlignmentIsInBytes = false;
SupportsDebugInformation = true;
ExceptionsType = ExceptionHandling::WinEH;
}
+
+AArch64MCAsmInfoMicrosoftCOFF::AArch64MCAsmInfoMicrosoftCOFF() {
+ CommentString = ";";
+}
+
+AArch64MCAsmInfoGNUCOFF::AArch64MCAsmInfoGNUCOFF() {
+ CommentString = "//";
+}
explicit AArch64MCAsmInfoCOFF();
};
+struct AArch64MCAsmInfoMicrosoftCOFF : public AArch64MCAsmInfoCOFF {
+ explicit AArch64MCAsmInfoMicrosoftCOFF();
+};
+
+struct AArch64MCAsmInfoGNUCOFF : public AArch64MCAsmInfoCOFF {
+ explicit AArch64MCAsmInfoGNUCOFF();
+};
+
} // namespace llvm
#endif
MCAsmInfo *MAI;
if (TheTriple.isOSBinFormatMachO())
MAI = new AArch64MCAsmInfoDarwin();
+ else if (TheTriple.isWindowsMSVCEnvironment())
+ MAI = new AArch64MCAsmInfoMicrosoftCOFF();
else if (TheTriple.isOSBinFormatCOFF())
- MAI = new AArch64MCAsmInfoCOFF();
+ MAI = new AArch64MCAsmInfoGNUCOFF();
else {
assert(TheTriple.isOSBinFormatELF() && "Invalid target");
MAI = new AArch64MCAsmInfoELF(TheTriple);
--- /dev/null
+// RUN: llvm-mc -triple aarch64-windows-gnu -filetype obj -o %t.obj %s
+// RUN: llvm-objdump -d %t.obj | FileCheck %s
+
+func:
+// Check that the nop instruction after the semicolon also is handled
+nop; nop
+add x0, x0, #42
+
+// CHECK: 0: 1f 20 03 d5 nop
+// CHECK: 4: 1f 20 03 d5 nop
+// CHECK: 8: 00 a8 00 91 add x0, x0, #42