[llvm-bugs] [Bug 42299] New: Should warn for __attribute__((pcs("aapcs-vfp"))) when target does not have floating-point

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 17 05:19:48 PDT 2019


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

            Bug ID: 42299
           Summary: Should warn for __attribute__((pcs("aapcs-vfp"))) when
                    target does not have floating-point
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: john.brawn at arm.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

If you take the following:

__attribute__((pcs("aapcs-vfp")))
float add1(float a, float b) {
  return a + b;
}

__attribute__((pcs("aapcs")))
float add2(float a, float b) {
  return a + b;
}

and compile with --target=arm-none-eabi -mcpu=cortex-m3 then both functions are
generated with the aapcs pcs as the cortex-m3 doesn't have floating-point.

We should be giving a warning that pcs("aapcs-vfp") is being ignored. Looks
like ARMTargetInfo::checkCallingConvention is probably the place to do this.

-- 
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/20190617/ccd936a7/attachment.html>


More information about the llvm-bugs mailing list