1/* 2 * Copyright (c) 2013, Andreas Sandberg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 62 unchanged lines hidden (view full) --- 71 ((exp) & FP80_EXP_MASK) 72 73#define BUILD_FP80_FI(frac, exp) \ 74 ((exp) ? FP80_INT_BIT : 0) | \ 75 ((frac) & FP80_FRAC_MASK) 76 77#define BUILD_FP80(sign, frac, exp) \ 78 { \ |
79 .repr.se = BUILD_FP80_SE(sign, exp), \ 80 .repr.fi = BUILD_FP80_FI(frac, exp) \ |
81 } 82 83#define FP80_FRAC(fp80) \ |
84 (fp80.repr.fi & FP80_FRAC_MASK) |
85 86#define FP80_EXP(fp80) \ |
87 (fp80.repr.se & FP80_EXP_MASK) |
88 89#define FP64_FRAC(fp64) \ 90 (fp64.bits & FP64_FRAC_MASK) 91 92#define FP64_EXP(fp80) \ 93 ((fp64.bits & FP64_EXP_MASK) >> FP64_EXP_SHIFT) 94 95#endif |