64 bit support

This commit is contained in:
Ethan Roseman 2020-12-03 16:00:58 -05:00
parent 3defc8f5a3
commit 5cfb8c61f7
6 changed files with 13 additions and 5 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

0
config.sub vendored Normal file → Executable file
View File

View File

@ -3406,7 +3406,8 @@ init_emit_once (line_numbers)
bzero ((char *) &u, sizeof u); /* Zero any holes in a structure. */ bzero ((char *) &u, sizeof u); /* Zero any holes in a structure. */
u.d = i == 0 ? dconst0 : i == 1 ? dconst1 : dconst2; u.d = i == 0 ? dconst0 : i == 1 ? dconst1 : dconst2;
bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (tem), sizeof u); bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (tem), sizeof u / 2);
bcopy ((char *) &u + (sizeof u / 2), (char *) &CONST_DOUBLE_HIGH (tem), sizeof u / 2);
CONST_DOUBLE_MEM (tem) = cc0_rtx; CONST_DOUBLE_MEM (tem) = cc0_rtx;
PUT_MODE (tem, mode); PUT_MODE (tem, mode);

0
move-if-change Normal file → Executable file
View File

5
real.h
View File

@ -21,6 +21,8 @@ Boston, MA 02111-1307, USA. */
#ifndef REAL_H_INCLUDED #ifndef REAL_H_INCLUDED
#define REAL_H_INCLUDED #define REAL_H_INCLUDED
#include <stdint.h>
/* Define codes for all the float formats that we know of. */ /* Define codes for all the float formats that we know of. */
#define UNKNOWN_FLOAT_FORMAT 0 #define UNKNOWN_FLOAT_FORMAT 0
#define IEEE_FLOAT_FORMAT 1 #define IEEE_FLOAT_FORMAT 1
@ -432,7 +434,8 @@ REAL_VALUE_TYPE real_value_from_int_cst ();
#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \ #define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \
do { union real_extract u; \ do { union real_extract u; \
bcopy ((char *) &CONST_DOUBLE_LOW ((from)), (char *) &u, sizeof u); \ bcopy ((uint8_t *) &CONST_DOUBLE_LOW ((from)), (uint8_t *) &u, (sizeof u) / 2); \
bcopy ((uint8_t *) &CONST_DOUBLE_HIGH ((from)), ((uint8_t *) &u) + (sizeof u / 2), (sizeof u) / 2); \
to = u.d; } while (0) to = u.d; } while (0)
/* Return a CONST_DOUBLE with value R and mode M. */ /* Return a CONST_DOUBLE with value R and mode M. */

View File

@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <setjmp.h> #include <setjmp.h>
#include <stdint.h>
/* #include <stab.h> */ /* #include <stab.h> */
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
@ -2265,8 +2266,9 @@ immed_real_const_1 (d, mode)
If one is found, return it. */ If one is found, return it. */
for (r = const_double_chain; r; r = CONST_DOUBLE_CHAIN (r)) for (r = const_double_chain; r; r = CONST_DOUBLE_CHAIN (r))
if (! bcmp ((char *) &CONST_DOUBLE_LOW (r), (char *) &u, sizeof u) if (! bcmp ((char *) &CONST_DOUBLE_LOW (r), (char *) &u, sizeof u / 2) &&
&& GET_MODE (r) == mode) ! bcmp ((char *) &CONST_DOUBLE_HIGH (r), ((char *) &u) + (sizeof u / 2), sizeof u / 2)
&& GET_MODE (r) == mode)
return r; return r;
/* No; make a new one and add it to the chain. /* No; make a new one and add it to the chain.
@ -2281,7 +2283,8 @@ immed_real_const_1 (d, mode)
rtl_in_saveable_obstack (); rtl_in_saveable_obstack ();
r = rtx_alloc (CONST_DOUBLE); r = rtx_alloc (CONST_DOUBLE);
PUT_MODE (r, mode); PUT_MODE (r, mode);
bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (r), sizeof u); bcopy ((char *) &u, (char *) &CONST_DOUBLE_LOW (r), sizeof u / 2);
bcopy (((char *) &u) + + (sizeof u / 2), (char *) &CONST_DOUBLE_HIGH (r), sizeof u / 2);
pop_obstacks (); pop_obstacks ();
/* Don't touch const_double_chain in nested function; see force_const_mem. /* Don't touch const_double_chain in nested function; see force_const_mem.