| 1 |
/* PR target/94743 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* Thumb1 mode not supported for interrupt routines. */ |
| 4 |
/* { dg-require-effective-target arm32 } */ |
| 5 |
/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ |
| 6 |
/* { dg-options "-mgeneral-regs-only -mfloat-abi=soft" } */ |
| 7 |
|
| 8 |
/* Check that we do not emit a warning when compiling an IRQ handler |
| 9 |
with -mgeneral-regs-only even when using floating-point data. */ |
| 10 |
typedef struct { |
| 11 |
/* Since we use -mfloat=abi=soft, this will generate calls to |
| 12 |
libgcc, but won't clobber VFP registers. */ |
| 13 |
double fpdata[32]; |
| 14 |
} dummy_t; |
| 15 |
|
| 16 |
dummy_t global_d; |
| 17 |
dummy_t global_d1; |
| 18 |
|
| 19 |
/* This function does not clobber VFP registers. */ |
| 20 |
__attribute__ ((interrupt("IRQ"))) void IRQ_HDLR_Test(void) |
| 21 |
{ |
| 22 |
global_d.fpdata[3] += global_d.fpdata[3] * global_d1.fpdata[3]; |
| 23 |
} |