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