[LLVMbugs] [Bug 850] NEW: llc generating invalid x86 asm

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jul 27 19:03:48 PDT 2006


           Summary: llc generating invalid x86 asm
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: ribrdb at gmail.com

This llvm asm:
%tmp9.i.i = call int asm sideeffect "push %ebp\0Apush %ebx\0Amovl
4($2),%ebp\0Amovl 0($2), %ebx\0Amovl $1,%eax\0Aint  $$0x80\0Apop  %ebx\0Apop 
%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 expression

I 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.

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list