[llvm-bugs] [Bug 26475] New: Wrong float return for i386-pc-elfiamcu target

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 4 08:36:24 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26475

            Bug ID: 26475
           Summary: Wrong float return for i386-pc-elfiamcu target
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: hjl.tools at gmail.com
                CC: david.l.kreitzer at intel.com, kevin.b.smith at intel.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

[hjl at gnu-6 mcu-1]$ cat float.c 
float
foo (void)
{
  return 68;
}
[hjl at gnu-6 mcu-1]$ make
/net/gnu-32/export/build/gnu/llvm-clang-x32-bootstrap/stage1/build-x86_64-linux-gnux32/bin/clang
-S -O -target i386-pc-elfiamcu float.c
[hjl at gnu-6 mcu-1]$ cat float.s
    .text
    .file    "float.c"
    .section    .rodata.cst4,"aM", at progbits,4
    .p2align    2
.LCPI0_0:
    .long    1116209152              # float 68
    .text
    .globl    foo
    .p2align    4, 0x90
    .type    foo, at function
foo:                                    # @foo
# BB#0:
    pushl    %ebp
    movl    %esp, %ebp
    flds    .LCPI0_0
    popl    %ebp
    retl
.Lfunc_end0:
    .size    foo, .Lfunc_end0-foo

GCC generates:

oo:
.LFB0:
    .cfi_startproc
    movl    .LC0, %eax
    ret
    .cfi_endproc
.LFE0:
    .size    foo, .-foo

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160204/dd904e15/attachment.html>


More information about the llvm-bugs mailing list