David Howells | 9f97da7 | 2012-03-28 18:30:01 +0100 | [diff] [blame] | 1 | #ifndef __ASM_ARM_COMPILER_H |
| 2 | #define __ASM_ARM_COMPILER_H |
| 3 | |
| 4 | /* |
| 5 | * This is used to ensure the compiler did actually allocate the register we |
| 6 | * asked it for some inline assembly sequences. Apparently we can't trust |
| 7 | * the compiler from one version to another so a bit of paranoia won't hurt. |
| 8 | * This string is meant to be concatenated with the inline asm string and |
| 9 | * will cause compilation to stop on mismatch. |
| 10 | * (for details, see gcc PR 15089) |
Ard Biesheuvel | ada63d4 | 2015-01-29 18:09:13 +0100 | [diff] [blame] | 11 | * For compatibility with clang, we have to specifically take the equivalence |
| 12 | * of 'r11' <-> 'fp' and 'r12' <-> 'ip' into account as well. |
David Howells | 9f97da7 | 2012-03-28 18:30:01 +0100 | [diff] [blame] | 13 | */ |
Ard Biesheuvel | ada63d4 | 2015-01-29 18:09:13 +0100 | [diff] [blame] | 14 | #define __asmeq(x, y) \ |
| 15 | ".ifnc " x "," y "; " \ |
| 16 | ".ifnc " x y ",fpr11; " \ |
| 17 | ".ifnc " x y ",r11fp; " \ |
| 18 | ".ifnc " x y ",ipr12; " \ |
| 19 | ".ifnc " x y ",r12ip; " \ |
| 20 | ".err; " \ |
| 21 | ".endif; " \ |
| 22 | ".endif; " \ |
| 23 | ".endif; " \ |
| 24 | ".endif; " \ |
| 25 | ".endif\n\t" |
David Howells | 9f97da7 | 2012-03-28 18:30:01 +0100 | [diff] [blame] | 26 | |
| 27 | |
| 28 | #endif /* __ASM_ARM_COMPILER_H */ |