[inlineasm] x86 backend references incorrect size registers for single-register classes #1222
Labels
backend:X86
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
miscompilation
Extended Description
This llvm asm:$1,%eax\0Aint $ $0x80\0Apop %ebx\0Apop
%tmp9.i.i = call int asm sideeffect "push %ebp\0Apush %ebx\0Amovl
4($2),%ebp\0Amovl 0($2), %ebx\0Amovl
%ebp", "={ax},i,0,{cx},{dx},{si},{di},
{dirflag},{fpsr},{flags},{memory}"(int 192, int %__s.i.i, int %tmp5.i.i, int %tmp6.i.i, int %tmp7.i.i, int %tmp8.i.i )
is being translated to this x86 asm:
push %ebp
push %ebx
movl 4(%ax),%ebp
movl 0(%ax), %ebx
movl $192,%eax
int $0x80
pop %ebx
pop %ebp
which gives this error:
/tmp/tmpQspyNp.s: Assembler messages:
/tmp/tmpQspyNp.s:277646: Error:
4(%ax)' is not a valid base/index expression /tmp/tmpQspyNp.s:277647: Error:
0(%ax)' is not a valid base/index expressionI don't speak asm, so I don't know if this error is in the gcc inline asm ->
llvm inline asm or the llvm asm -> x86 translation process.
The text was updated successfully, but these errors were encountered: