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.
Details
Diff Detail
Event Timeline
An example of where this is used is e.g. https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/stdio/scanf2-template.S (with aarch64 support is added in a patch at https://sourceforge.net/p/mingw-w64/mailman/message/35983275/).
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 | Can we make this consistent with the other Targets? else if (TheTriple.isWindowsMSVCEnvironment()) MAI = new ARMCOFFMCAsmInfoMicrosoft(); else if (TheTriple.isOSWindows()) MAI = new ARMCOFFMCAsmInfoGNU(); So flip this so it checks if MSVCEnvironment first and if not and still windows do the GNU style. |
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 | Sure. Then I'll update the existing test in test/MC/AArch64/coff-relocations.s from aarch64-windows to aarch64-windows-msvc, since that test uses ; for comments. Then it might also make sense to add a AArch64COFFMCAsmInfoMicrosoft frontend classs if msvc is the exception, not the default case, right? |
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 | I never clarified why... cygwin, midipix etc. :) else if (TheTriple.isWindowsMSVCEnvironment()) MAI = new AArch64MCAsmInfoCOFF(); else if (TheTriple.isOSWindows()) MAI = new AArch64MCAsmInfoCOFFGNU(); should suffice, though AArch64MCAsmInfoCOFF should be AArch64COFFMCAsmInfoMicrosoft |
lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | ||
---|---|---|
72 | I wrote that before seeing your reply. |
Made the GNU case the default. Apparently I didn't have to update the existing test either, because aarch64-windows still triggers isWindowsMSVCEnvironment (but not isKnownWindowsMSVCEnvironment).
Can we make this consistent with the other Targets?
In ARMMCTargetDesc.cpp we have
So flip this so it checks if MSVCEnvironment first and if not and still windows do the GNU style.
It also seems we should have
AArch64COFFMCAsmInfo and not AArch64MCAsmInfoCOFF but that is outside the scope of this patch