Skip to content

Commit e60cf25

Browse files
committed
clang-format
Created using spr 1.3.6-beta.1
1 parent 0175cae commit e60cf25

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

compiler-rt/test/builtins/Unit/fp_test.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#include <stdlib.h>
1+
#include <assert.h>
22
#include <limits.h>
3-
#include <string.h>
43
#include <stdint.h>
5-
#include <assert.h>
4+
#include <stdlib.h>
5+
#include <string.h>
66

77
#include "int_types.h"
88

@@ -233,43 +233,43 @@ static inline double makeQNaN64(void)
233233

234234
#if HAS_80_BIT_LONG_DOUBLE
235235
static inline xf_float F80FromRep80(uint16_t hi, uint64_t lo) {
236-
uqwords bits;
237-
bits.high.all = hi;
238-
bits.low.all = lo;
239-
xf_float ret;
240-
static_assert(sizeof(xf_float) <= sizeof(uqwords), "wrong representation");
241-
memcpy(&ret, &bits, sizeof(ret));
242-
return ret;
236+
uqwords bits;
237+
bits.high.all = hi;
238+
bits.low.all = lo;
239+
xf_float ret;
240+
static_assert(sizeof(xf_float) <= sizeof(uqwords), "wrong representation");
241+
memcpy(&ret, &bits, sizeof(ret));
242+
return ret;
243243
}
244244

245245
static inline uqwords F80ToRep80(xf_float x) {
246-
uqwords ret;
247-
memset(&ret, 0, sizeof(ret));
248-
memcpy(&ret, &x, sizeof(x));
249-
// Any bits beyond the first 16 in high are undefined.
250-
ret.high.all = (uint16_t)ret.high.all;
251-
return ret;
246+
uqwords ret;
247+
memset(&ret, 0, sizeof(ret));
248+
memcpy(&ret, &x, sizeof(x));
249+
// Any bits beyond the first 16 in high are undefined.
250+
ret.high.all = (uint16_t)ret.high.all;
251+
return ret;
252252
}
253253

254254
static inline int compareResultF80(xf_float result, uint16_t expectedHi,
255255
uint64_t expectedLo) {
256-
uqwords rep = F80ToRep80(result);
257-
// F80 high occupies the lower 16 bits of high.
258-
assert((uint64_t)(uint16_t)rep.high.all == rep.high.all);
259-
return !(rep.high.all == expectedHi && rep.low.all == expectedLo);
256+
uqwords rep = F80ToRep80(result);
257+
// F80 high occupies the lower 16 bits of high.
258+
assert((uint64_t)(uint16_t)rep.high.all == rep.high.all);
259+
return !(rep.high.all == expectedHi && rep.low.all == expectedLo);
260260
}
261261

262262
static inline xf_float makeQNaN80(void) {
263-
return F80FromRep80(0x7fffu, 0xc000000000000000UL);
263+
return F80FromRep80(0x7fffu, 0xc000000000000000UL);
264264
}
265265

266266
static inline xf_float makeNaN80(uint64_t rand) {
267-
return F80FromRep80(0x7fffu,
268-
0x8000000000000000 | (rand & 0x3fffffffffffffff));
267+
return F80FromRep80(0x7fffu,
268+
0x8000000000000000 | (rand & 0x3fffffffffffffff));
269269
}
270270

271271
static inline xf_float makeInf80(void) {
272-
return F80FromRep80(0x7fffu, 0x8000000000000000UL);
272+
return F80FromRep80(0x7fffu, 0x8000000000000000UL);
273273
}
274274

275275
static inline xf_float makeNegativeInf80(void) {

0 commit comments

Comments
 (0)