[LLVMbugs] [Bug 879] [X86] No support for fp stack in inline asm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 28 11:49:44 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=879

Jakob Stoklund Olesen <stoklund at 2pi.dk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #39 from Jakob Stoklund Olesen <stoklund at 2pi.dk> 2011-06-28 13:49:42 CDT ---
Fixed in r134018

Chris' tests now produce:


_floor:                                 ## @floor
## BB#0:                                ## %entry
    pushl    %ebp
    movl    %esp, %ebp
    fldl    8(%ebp)
    ## InlineAsm Start
    frndint
    ## InlineAsm End
    popl    %ebp
    ret

    .globl    _test
    .align    4, 0x90
_test:                                  ## @test
## BB#0:                                ## %entry
    pushl    %ebp
    movl    %esp, %ebp
    fldl    16(%ebp)
    fldl    8(%ebp)
    ## InlineAsm Start
    fucomip %st(1), %st; seta %al
    ## InlineAsm End
    fstp    %st(0)
    movsbl    %al, %eax
    popl    %ebp
    ret

    .globl    _test2
    .align    4, 0x90
_test2:                                 ## @test2
## BB#0:                                ## %entry
    pushl    %ebp
    movl    %esp, %ebp
    fld1
    fldl    8(%ebp)
    fxch
    ## InlineAsm Start
    fscale
    ## InlineAsm End
    fstp    %st(1)
    popl    %ebp
    ret

Roman's ldexp:

_ldexp:                                 ## @ldexp
## BB#0:                                ## %entry
    pushl    %ebp
    movl    %esp, %ebp
    pushl    %eax
    movl    16(%ebp), %eax
    movl    %eax, -4(%ebp)
    fildl    -4(%ebp)
    fldl    8(%ebp)
    ## InlineAsm Start
    fscale 
    ## InlineAsm End
    fstp    %st(1)
    addl    $4, %esp
    popl    %ebp
    ret

Dimitry:

_irint:                                 ## @irint
## BB#0:                                ## %entry
    pushl    %ebp
    movl    %esp, %ebp
    pushl    %eax
    fldl    8(%ebp)
    ## InlineAsm Start
    fistl -4(%ebp)
    ## InlineAsm End
    fstp    %st(0)
    movl    -4(%ebp), %eax
    addl    $4, %esp
    popl    %ebp
    ret

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list