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

            Bug ID: 48471
           Summary: ARM interrupt attribute warning incorrect for
                    M-profile
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

If you compile the following

  extern void fn(void);
  __attribute__((interrupt)) void example(void) {
    fn();
    return;
  }

with --target=arm-none-eabi -mcpu=cortex-m7 you get

tmp.c:3:3: warning: call to function without interrupt attribute could clobber
interruptee's VFP registers [-Wextra]
  fn();
  ^

This warning is incorrect for M-profile CPUs, as VFP registers are
automatically saved and later restored in M-profile CPUs when entering an
exception (or when a VFP register is modified in an exception handler if lazy
context save is enabled).

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