-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Description
| Bugzilla Link | 9506 |
| Version | trunk |
| OS | Linux |
| CC | @chandlerc,@rovka,@kbeyls,@pageexec |
Extended Description
the following code extracted from linux/arch/x86/kvm/emulate.c triggers an assert with r127872.
void f(void)
{
unsigned long _tmp, _rax, _rdx, _val, _eflags;
unsigned char _ex;
__asm__ __volatile__ (
"idivl %6;"
: "=m" (_eflags), "=&r" (_tmp),
"+a" (_rax), "+d" (_rdx), "+qm"(_ex)
: "i" (0x1234), "m" (_val),
"a" (_rax), "d" (_rdx));
}
clang output:
clang: /src/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1159: virtual bool::TwoAddressInstructionPass::runOnMachineFunction(llvm::MachineFunction&): Assertion `i == DstIdx || !mi->getOperand(i).isReg() || mi->getOperand(i).getReg() != regA' failed.
0 libLLVM-3.0svn.so 0xa16c10b8
Stack dump:
0. Program arguments: clang -cc1 -triple i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name a.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu pentium4 -target-linker-version 2.21 -momit-leaf-frame-pointer -resource-dir /src/build.i386/bin/../lib/clang/3.0 -ferror-limit 19 -fmessage-length 277 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o a.o -x c a.c
-
<eof> parser at end of file -
Code generation -
Running pass 'Function Pass Manager' on module 'a.c'. -
Running pass 'Two-Address instruction pass' on function '@f'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see invocation)