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: unassignedb...@nondot.org
          Reporter: hjl.to...@gmail.com
                CC: david.l.kreit...@intel.com, kevin.b.sm...@intel.com,
                    llvm-bugs@lists.llvm.org
    Classification: Unclassified

[hjl@gnu-6 mcu-1]$ cat float.c 
float
foo (void)
{
  return 68;
}
[hjl@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@gnu-6 mcu-1]$ cat float.s
    .text
    .file    "float.c"
    .section    .rodata.cst4,"aM",@progbits,4
    .p2align    2
.LCPI0_0:
    .long    1116209152              # float 68
    .text
    .globl    foo
    .p2align    4, 0x90
    .type    foo,@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to