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

            Bug ID: 27068
           Summary: ARM backend uses different ABI functions based on
                    optimization level
           Product: new-bugs
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: hi...@vectorfabrics.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

I'm using a build found here: http://llvm.org/apt/
$ clang-3.8 --version
Ubuntu clang version 3.8.0-svn257311-1~exp1 (trunk) (based on LLVM 3.8.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

The example program:
$ cat int.c
int f(int a, int b)
{
  return a % b;
}

-O0 uses __modsi3 (GNU style (?), not ARM EABI compliant)
$ clang-3.8 int.c -S -O0 -target arm-linux-androideabi -march=armv7-a -o - |
grep mod | grep bl
    bl    __modsi3

-O1 uses __aeabi_idivmod (ARM EABI compliant)
$ clang-3.8 int.c -S -O1 -target arm-linux-androideabi -march=armv7-a -o - |
grep mod | grep bl
    bl    __aeabi_idivmod(PLT)

I expect ARM EABI compliant code to be generated. On top of that, I expect the
ABI not to vary based on optimization level.

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