diff options
| author | Martin Storsjo <martin@martin.st> | 2018-07-26 10:48:20 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2018-07-26 10:48:20 +0000 |
| commit | 9dafd6f6d93ca67f63c09aa091b28ddf88ddfc14 (patch) | |
| tree | a2f14c53c1e849702c27d0b31cc051bc8662bcdd /llvm/lib/CodeGen/AsmPrinter | |
| parent | bea258d3d7ce297807671d493619065a68366347 (diff) | |
| download | bcm5719-llvm-9dafd6f6d93ca67f63c09aa091b28ddf88ddfc14.tar.gz bcm5719-llvm-9dafd6f6d93ca67f63c09aa091b28ddf88ddfc14.zip | |
Revert "[COFF] Use comdat shared constants for MinGW as well"
This reverts commit r337951.
While that kind of shared constant generally works fine in a MinGW
setting, it broke some cases of inline assembly that worked before:
$ cat const-asm.c
int MULH(int a, int b) {
int rt, dummy;
__asm__ (
"imull %3"
:"=d"(rt), "=a"(dummy)
:"a"(a), "rm"(b)
);
return rt;
}
int func(int a) {
return MULH(a, 1);
}
$ clang -target x86_64-win32-gnu -c const-asm.c -O2
const-asm.c:4:9: error: invalid variant '00000001'
"imull %3"
^
<inline asm>:1:15: note: instantiated into assembly here
imull __real@00000001(%rip)
^
A similar error is produced for i686 as well. The same test with a
target of x86_64-win32-msvc or i686-win32-msvc works fine.
llvm-svn: 338018
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index f659282ac27..9bbc77b3056 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -2664,7 +2664,7 @@ MCSymbol *AsmPrinter::GetBlockAddressSymbol(const BasicBlock *BB) const { /// GetCPISymbol - Return the symbol for the specified constant pool entry. MCSymbol *AsmPrinter::GetCPISymbol(unsigned CPID) const { - if (getSubtargetInfo().getTargetTriple().isOSWindows()) { + if (getSubtargetInfo().getTargetTriple().isKnownWindowsMSVCEnvironment()) { const MachineConstantPoolEntry &CPE = MF->getConstantPool()->getConstants()[CPID]; if (!CPE.isMachineConstantPoolEntry()) { |

