1 //===-- call_apsr.h - Helpers for ARM EABI floating point tests -----------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file declares helpers for ARM EABI floating point tests for the 11 // compiler_rt library. 12 // 13 //===----------------------------------------------------------------------===// 14 15 #ifndef CALL_APSR_H 16 #define CALL_APSR_H 17 18 #if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ 19 #error big endian support not implemented 20 #endif 21 22 union cpsr { 23 struct { 24 uint32_t filler: 28; 25 uint32_t v: 1; 26 uint32_t c: 1; 27 uint32_t z: 1; 28 uint32_t n: 1; 29 } flags; 30 uint32_t value; 31 }; 32 33 extern __attribute__((pcs("aapcs"))) 34 uint32_t call_apsr_f(float a, float b, __attribute__((pcs("aapcs"))) void (*fn)(float, float)); 35 36 extern __attribute__((pcs("aapcs"))) 37 uint32_t call_apsr_d(double a, double b, __attribute__((pcs("aapcs"))) void (*fn)(double, double)); 38 39 #endif // CALL_APSR_H 40