diff options
author | Marcus Huderle <huderlem@gmail.com> | 2017-12-27 16:22:00 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-27 16:22:00 -0600 |
commit | 6b611a3046a694d3972f2aa4df90d3ef78801217 (patch) | |
tree | 05f295c00cbbc1d5987a05da37e746fb841d4d83 /gcc/real.h | |
parent | 58c860d6c48324eba66dd19540db5584d832cf58 (diff) | |
parent | d88495e3f4061a411e654c7307aa94ac8a98c94b (diff) |
Merge pull request #13 from ProjectRevoTPP/libc
add libc building to agbcc.
Diffstat (limited to 'gcc/real.h')
-rwxr-xr-x | gcc/real.h | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -351,10 +351,13 @@ union tree_node; REAL_VALUE_TYPE real_value_from_int_cst (union tree_node *, union tree_node *); -#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ -do { union real_extract u; \ - memcpy((char *)&u, (char *)&CONST_DOUBLE_LOW(from), sizeof u); \ - to = u.d; } while (0) +#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ +do { \ + union real_extract u; \ + for (int i = 0; i < sizeof (REAL_VALUE_TYPE) / sizeof (HOST_WIDE_INT); i++) \ + u.i[i] = XWINT((from), 2 + i); \ + to = u.d; \ +} while (0) /* Return a CONST_DOUBLE with value R and mode M. */ |