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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to