Part Number: AM6548
Dear TI team,
I ask the same question again (previous thread is here: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1645070/rm57l843-ticlang-compiler-warning--warm-interrupt-vfp-clobber-wrongly-reported/6358145) because apparently I was not in the right section. Note that this is not related to any microcontroller. This issue I am reporting concerns the TI CLANG compiler. But I couldn't find the "compiler" TI part number...
I would like to report a strange compiler behavior. I am using TI Arm Clang Compiler 5.1.0.LTS. The following warning is displayed despite the usage of the attribute `interrupt_save_fp`:
warning: interrupt service routine with vfp enabled may clobber the interruptee's vfp
state; consider using the `interrupt_save_fp` attribute to prevent this behavior [-Warm-interrupt-vfp-clobber]
The warning is very easy to reproduce. Copy the following code in a .c file (e.g arm-interrupt-vfp-clobber.c):
int __attribute__( ( target( "arm" ), interrupt( "SWI" ) ) ) __attribute__( ( interrupt_save_fp ) ) handler( void )
{
return 0;
}
Then run the following compile command:
tiarmclang -mthumb -mcpu=cortex-r5 -o arm-interrupt-vfp-clobber.o -c arm-interrupt-vfp-clobber.c
Could you tell me how to resolve this warning please (other than disabling it with -Wno-arm-interrupt-vfp-clobber)?
Best regards,
Vincent
