[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / compiler-rt / test / builtins / Unit / arm / call_apsr.h
blobd4fcf5c97e71e8bea8d190e1a9fff670c79f6e4a
1 //===-- call_apsr.h - Helpers for ARM EABI floating point tests -----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares helpers for ARM EABI floating point tests for the
10 // compiler_rt library.
12 //===----------------------------------------------------------------------===//
14 #ifndef CALL_APSR_H
15 #define CALL_APSR_H
17 #if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
18 #error big endian support not implemented
19 #endif
21 union cpsr {
22 struct {
23 uint32_t filler: 28;
24 uint32_t v: 1;
25 uint32_t c: 1;
26 uint32_t z: 1;
27 uint32_t n: 1;
28 } flags;
29 uint32_t value;
32 extern __attribute__((pcs("aapcs")))
33 uint32_t call_apsr_f(float a, float b, __attribute__((pcs("aapcs"))) void (*fn)(float, float));
35 extern __attribute__((pcs("aapcs")))
36 uint32_t call_apsr_d(double a, double b, __attribute__((pcs("aapcs"))) void (*fn)(double, double));
38 #endif // CALL_APSR_H