| Issue |
61438
|
| Summary |
Assert in X86AsmParser::ParseMemOperand when passing two segment prefixes
|
| Labels |
backend:X86,
llvm:asmparser
|
| Assignees |
|
| Reporter |
ramosian-glider
|
The following code:
```
void foo() {
asm("movq $0, %cs:%ds:(%rax)");
}
```
triggers an assertion in `X86AsmParser::ParseMemOperand()`:
```
clang: /root/llvm-project/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:2946: bool {anonymous}::X86AsmParser::ParseMemOperand(unsigned int, const llvm::MCExpr*, llvm::SMLoc, llvm::SMLoc, llvm::OperandVector&): Assertion `!isa<X86MCExpr>(Disp) && "Expected non-register here."' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -S --gcc-toolchain=/opt/compiler-explorer/gcc-9.2.0 -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '<source>'.
4. Running pass 'X86 Assembly Printer' on function '@foo'
#0 0x000055a44e7bcdff llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3febdff)
#1 0x000055a44e7bab3c llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3fe9b3c)
```
Godbolt link: https://godbolt.org/z/b381Werh9
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs