Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
37366632
Commit
37366632
authored
Jul 06, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1475
parent
fb3821f7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
96 deletions
+107
-96
gcc/regclass.c
+4
-3
gcc/sdbout.c
+2
-2
gcc/stmt.c
+0
-0
gcc/toplev.c
+40
-37
gcc/tree.c
+27
-24
gcc/varasm.c
+34
-30
No files found.
gcc/regclass.c
View file @
37366632
...
...
@@ -536,7 +536,7 @@ regclass (f, nregs)
if
(
GET_CODE
(
insn
)
==
INSN
&&
(
noperands
=
asm_noperands
(
PATTERN
(
insn
)))
>=
0
)
{
decode_asm_operands
(
PATTERN
(
insn
),
recog_operand
,
0
,
decode_asm_operands
(
PATTERN
(
insn
),
recog_operand
,
NULL_PTR
,
constraints
,
modes
);
nalternatives
=
n_occurrences
(
','
,
constraints
[
0
])
+
1
;
}
...
...
@@ -557,7 +557,8 @@ regclass (f, nregs)
if
(
set
!=
0
&&
GET_CODE
(
SET_DEST
(
set
))
==
REG
&&
GET_CODE
(
SET_SRC
(
set
))
==
MEM
&&
(
note
=
find_reg_note
(
insn
,
REG_EQUIV
,
0
))
!=
0
&&
(
note
=
find_reg_note
(
insn
,
REG_EQUIV
,
NULL_RTX
))
!=
0
&&
GET_CODE
(
XEXP
(
note
,
0
))
==
MEM
)
{
costs
[
REGNO
(
SET_DEST
(
set
))].
mem_cost
...
...
@@ -984,7 +985,7 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
/* Match any floating double constant, but only if
we can examine the bits of it reliably. */
if
((
HOST_FLOAT_FORMAT
!=
TARGET_FLOAT_FORMAT
||
HOST_BITS_PER_INT
!=
BITS_PER_WORD
)
||
HOST_BITS_PER_
WIDE_
INT
!=
BITS_PER_WORD
)
&&
GET_MODE
(
op
)
!=
VOIDmode
&&
!
flag_pretend_float
)
break
;
if
(
GET_CODE
(
op
)
==
CONST_DOUBLE
)
...
...
gcc/sdbout.c
View file @
37366632
...
...
@@ -1129,8 +1129,8 @@ sdbout_parms (parms)
/* Perform any necessary register eliminations on the parameter's rtl,
so that the debugging output will be accurate. */
DECL_INCOMING_RTL
(
parms
)
=
eliminate_regs
(
DECL_INCOMING_RTL
(
parms
),
0
,
0
);
DECL_RTL
(
parms
)
=
eliminate_regs
(
DECL_RTL
(
parms
),
0
,
0
);
eliminate_regs
(
DECL_INCOMING_RTL
(
parms
),
0
,
NULL_RTX
);
DECL_RTL
(
parms
)
=
eliminate_regs
(
DECL_RTL
(
parms
),
0
,
NULL_RTX
);
if
(
PARM_PASSED_IN_MEMORY
(
parms
))
{
...
...
gcc/stmt.c
View file @
37366632
This diff is collapsed.
Click to expand it.
gcc/toplev.c
View file @
37366632
...
...
@@ -853,13 +853,16 @@ report_error_function (file)
}
/* Report an error at the current line number.
S and V are a string and an arg for `printf'. */
S is a string and V and V2 are args for `printf'. We use HOST_WIDE_INT
as the type for these args assuming it is wide enough to hold a
pointer. This isn't terribly portable, but is the best we can do
without vprintf universally available. */
void
error
(
s
,
v
,
v2
)
char
*
s
;
int
v
;
/* @@a
lso used as pointer */
int
v2
;
/* @@a
lso used as pointer */
HOST_WIDE_INT
v
;
/* A
lso used as pointer */
HOST_WIDE_INT
v2
;
/* A
lso used as pointer */
{
error_with_file_and_line
(
input_filename
,
lineno
,
s
,
v
,
v2
);
}
...
...
@@ -872,8 +875,8 @@ error_with_file_and_line (file, line, s, v, v2)
char
*
file
;
int
line
;
char
*
s
;
int
v
;
int
v2
;
HOST_WIDE_INT
v
;
HOST_WIDE_INT
v2
;
{
count_error
(
0
);
...
...
@@ -888,13 +891,14 @@ error_with_file_and_line (file, line, s, v, v2)
}
/* Report an error at the declaration DECL.
S and V are a string and an arg which uses %s to substitute the declaration name. */
S and V are a string and an arg which uses %s to substitute
the declaration name. */
void
error_with_decl
(
decl
,
s
,
v
)
tree
decl
;
char
*
s
;
int
v
;
HOST_WIDE_INT
v
;
{
char
*
junk
;
count_error
(
0
);
...
...
@@ -920,8 +924,8 @@ void
error_for_asm
(
insn
,
s
,
v
,
v2
)
rtx
insn
;
char
*
s
;
int
v
;
/* @@a
lso used as pointer */
int
v2
;
/* @@a
lso used as pointer */
HOST_WIDE_INT
v
;
/* A
lso used as pointer */
HOST_WIDE_INT
v2
;
/* A
lso used as pointer */
{
char
*
filename
;
int
line
;
...
...
@@ -954,9 +958,7 @@ warning_with_file_and_line (file, line, s, v, v2, v3)
char
*
file
;
int
line
;
char
*
s
;
int
v
;
int
v2
;
int
v3
;
HOST_WIDE_INT
v
,
v2
,
v3
;
{
if
(
count_error
(
1
)
==
0
)
return
;
...
...
@@ -979,9 +981,7 @@ warning_with_file_and_line (file, line, s, v, v2, v3)
void
warning
(
s
,
v
,
v2
,
v3
)
char
*
s
;
int
v
;
/* @@also used as pointer */
int
v2
;
int
v3
;
HOST_WIDE_INT
v
,
v2
,
v3
;
/* Also used as pointer */
{
warning_with_file_and_line
(
input_filename
,
lineno
,
s
,
v
,
v2
,
v3
);
}
...
...
@@ -994,7 +994,7 @@ void
warning_with_decl
(
decl
,
s
,
v
)
tree
decl
;
char
*
s
;
int
v
;
HOST_WIDE_INT
v
;
{
char
*
junk
;
...
...
@@ -1023,8 +1023,8 @@ void
warning_for_asm
(
insn
,
s
,
v
,
v2
)
rtx
insn
;
char
*
s
;
int
v
;
/* @@a
lso used as pointer */
int
v2
;
/* @@a
lso used as pointer */
HOST_WIDE_INT
v
;
/* A
lso used as pointer */
HOST_WIDE_INT
v2
;
/* A
lso used as pointer */
{
char
*
filename
;
int
line
;
...
...
@@ -1055,8 +1055,8 @@ warning_for_asm (insn, s, v, v2)
void
pedwarn
(
s
,
v
,
v2
)
char
*
s
;
int
v
;
/* @@a
lso used as pointer */
int
v2
;
HOST_WIDE_INT
v
;
/* A
lso used as pointer */
HOST_WIDE_INT
v2
;
{
if
(
flag_pedantic_errors
)
error
(
s
,
v
,
v2
);
...
...
@@ -1068,7 +1068,7 @@ void
pedwarn_with_decl
(
decl
,
s
,
v
)
tree
decl
;
char
*
s
;
int
v
;
HOST_WIDE_INT
v
;
{
if
(
flag_pedantic_errors
)
error_with_decl
(
decl
,
s
,
v
);
...
...
@@ -1081,8 +1081,8 @@ pedwarn_with_file_and_line (file, line, s, v, v2)
char
*
file
;
int
line
;
char
*
s
;
int
v
;
int
v2
;
HOST_WIDE_INT
v
;
HOST_WIDE_INT
v2
;
{
if
(
flag_pedantic_errors
)
error_with_file_and_line
(
file
,
line
,
s
,
v
,
v2
);
...
...
@@ -1096,7 +1096,7 @@ pedwarn_with_file_and_line (file, line, s, v, v2)
void
sorry
(
s
,
v
,
v2
)
char
*
s
;
int
v
,
v2
;
HOST_WIDE_INT
v
,
v2
;
{
sorrycount
++
;
if
(
input_filename
)
...
...
@@ -1115,7 +1115,7 @@ sorry (s, v, v2)
void
really_sorry
(
s
,
v
,
v2
)
char
*
s
;
int
v
,
v2
;
HOST_WIDE_INT
v
,
v2
;
{
if
(
input_filename
)
fprintf
(
stderr
,
"%s:%d: "
,
input_filename
,
lineno
);
...
...
@@ -1185,11 +1185,13 @@ xrealloc (ptr, size)
}
/* Return the logarithm of X, base 2, considering X unsigned,
if X is a power of 2. Otherwise, returns -1. */
if X is a power of 2. Otherwise, returns -1.
This should be used via the `exact_log2' macro. */
int
exact_log2
(
x
)
register
unsigned
int
x
;
exact_log2
_wide
(
x
)
register
unsigned
HOST_WIDE_INT
x
;
{
register
int
log
=
0
;
/* Test for 0 or a power of 2. */
...
...
@@ -1201,11 +1203,13 @@ exact_log2 (x)
}
/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
If X is 0, return -1. */
If X is 0, return -1.
This should be used via the floor_log2 macro. */
int
floor_log2
(
x
)
register
unsigned
int
x
;
floor_log2
_wide
(
x
)
register
unsigned
HOST_WIDE_INT
x
;
{
register
int
log
=
-
1
;
while
(
x
!=
0
)
...
...
@@ -1686,7 +1690,7 @@ compile_file (name)
||
TREE_USED
(
decl
)
||
TREE_ADDRESSABLE
(
decl
)
||
TREE_ADDRESSABLE
(
DECL_ASSEMBLER_NAME
(
decl
)))
rest_of_decl_compilation
(
decl
,
0
,
1
,
1
);
rest_of_decl_compilation
(
decl
,
NULL_PTR
,
1
,
1
);
else
/* Cancel the RTL for this decl so that, if debugging info
output for global variables is still to come,
...
...
@@ -2171,7 +2175,7 @@ rest_of_compilation (decl)
{
TIMEVAR
(
loop_time
,
{
loop_optimize
(
insns
,
loop_dump
?
loop_dump_file
:
0
);
loop_optimize
(
insns
,
loop_dump
_file
);
});
}
...
...
@@ -2349,10 +2353,9 @@ rest_of_compilation (decl)
TIMEVAR
(
global_alloc_time
,
{
if
(
!
obey_regdecls
)
failure
=
global_alloc
(
global_reg_dump
?
global_reg_dump_file
:
0
);
failure
=
global_alloc
(
global_reg_dump
_file
);
else
failure
=
reload
(
insns
,
0
,
global_reg_dump
?
global_reg_dump_file
:
0
);
failure
=
reload
(
insns
,
0
,
global_reg_dump_file
);
});
if
(
global_reg_dump
)
...
...
@@ -2521,7 +2524,7 @@ rest_of_compilation (decl)
queued up for sdb output. */
#ifdef SDB_DEBUGGING_INFO
if
(
write_symbols
==
SDB_DEBUG
)
sdbout_types
(
0
);
sdbout_types
(
NULL_TREE
);
#endif
/* Put back the tree of subblocks from before we copied it.
...
...
gcc/tree.c
View file @
37366632
...
...
@@ -537,7 +537,7 @@ obfree (ptr)
char
*
permalloc
(
size
)
long
size
;
int
size
;
{
return
(
char
*
)
obstack_alloc
(
&
permanent_obstack
,
size
);
}
...
...
@@ -1055,11 +1055,13 @@ set_identifier_size (size)
/* Return a newly constructed INTEGER_CST node whose constant value
is specified by the two ints LOW and HI.
The TREE_TYPE is set to `int'. */
The TREE_TYPE is set to `int'.
This function should be used via the `build_int_2' macro. */
tree
build_int_2
(
low
,
hi
)
int
low
,
hi
;
build_int_2
_wide
(
low
,
hi
)
HOST_WIDE_INT
low
,
hi
;
{
register
tree
t
=
make_node
(
INTEGER_CST
);
TREE_INT_CST_LOW
(
t
)
=
low
;
...
...
@@ -1105,17 +1107,17 @@ real_value_from_int_cst (i)
if
(
TREE_INT_CST_HIGH
(
i
)
<
0
)
{
d
=
(
double
)
(
~
TREE_INT_CST_HIGH
(
i
));
d
*=
((
double
)
(
1
<<
(
HOST_BITS_PER
_INT
/
2
))
*
(
double
)
(
1
<<
(
HOST_BITS_PER
_INT
/
2
)));
d
+=
(
double
)
(
unsigned
)
(
~
TREE_INT_CST_LOW
(
i
));
d
*=
((
double
)
(
(
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE
_INT
/
2
))
*
(
double
)
(
(
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE
_INT
/
2
)));
d
+=
(
double
)
(
unsigned
HOST_WIDE_INT
)
(
~
TREE_INT_CST_LOW
(
i
));
d
=
(
-
d
-
1
.
0
);
}
else
{
d
=
(
double
)
TREE_INT_CST_HIGH
(
i
);
d
*=
((
double
)
(
1
<<
(
HOST_BITS_PER
_INT
/
2
))
*
(
double
)
(
1
<<
(
HOST_BITS_PER
_INT
/
2
)));
d
+=
(
double
)
(
unsigned
)
TREE_INT_CST_LOW
(
i
);
d
*=
((
double
)
(
(
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE
_INT
/
2
))
*
(
double
)
(
(
HOST_WIDE_INT
)
1
<<
(
HOST_BITS_PER_WIDE
_INT
/
2
)));
d
+=
(
double
)
(
unsigned
HOST_WIDE_INT
)
TREE_INT_CST_LOW
(
i
);
}
#endif
/* not REAL_ARITHMETIC */
return
d
;
...
...
@@ -1258,27 +1260,27 @@ integer_all_onesp (expr)
return
TREE_INT_CST_LOW
(
expr
)
==
-
1
&&
TREE_INT_CST_HIGH
(
expr
)
==
-
1
;
prec
=
TYPE_PRECISION
(
TREE_TYPE
(
expr
));
if
(
prec
>=
HOST_BITS_PER_INT
)
if
(
prec
>=
HOST_BITS_PER_
WIDE_
INT
)
{
int
high_value
,
shift_amount
;
shift_amount
=
prec
-
HOST_BITS_PER_INT
;
shift_amount
=
prec
-
HOST_BITS_PER_
WIDE_
INT
;
if
(
shift_amount
>
HOST_BITS_PER_INT
)
if
(
shift_amount
>
HOST_BITS_PER_
WIDE_
INT
)
/* Can not handle precisions greater than twice the host int size. */
abort
();
else
if
(
shift_amount
==
HOST_BITS_PER_INT
)
else
if
(
shift_amount
==
HOST_BITS_PER_
WIDE_
INT
)
/* Shifting by the host word size is undefined according to the ANSI
standard, so we must handle this as a special case. */
high_value
=
-
1
;
else
high_value
=
(
1
<<
shift_amount
)
-
1
;
high_value
=
(
(
HOST_WIDE_INT
)
1
<<
shift_amount
)
-
1
;
return
TREE_INT_CST_LOW
(
expr
)
==
-
1
&&
TREE_INT_CST_HIGH
(
expr
)
==
high_value
;
}
else
return
TREE_INT_CST_LOW
(
expr
)
==
(
1
<<
prec
)
-
1
;
return
TREE_INT_CST_LOW
(
expr
)
==
(
(
HOST_WIDE_INT
)
1
<<
prec
)
-
1
;
}
/* Return 1 if EXPR is an integer constant that is a power of 2 (i.e., has only
...
...
@@ -1288,7 +1290,7 @@ int
integer_pow2p
(
expr
)
tree
expr
;
{
int
high
,
low
;
HOST_WIDE_INT
high
,
low
;
while
(
TREE_CODE
(
expr
)
==
NON_LVALUE_EXPR
)
expr
=
TREE_OPERAND
(
expr
,
0
);
...
...
@@ -1646,7 +1648,7 @@ size_in_bytes (type)
type
=
TYPE_MAIN_VARIANT
(
type
);
if
(
TYPE_SIZE
(
type
)
==
0
)
{
incomplete_type_error
(
0
,
type
);
incomplete_type_error
(
NULL_TREE
,
type
);
return
integer_zero_node
;
}
return
size_binop
(
CEIL_DIV_EXPR
,
TYPE_SIZE
(
type
),
...
...
@@ -1747,7 +1749,7 @@ save_expr (expr)
||
TREE_CODE
(
t
)
==
SAVE_EXPR
)
return
t
;
t
=
build
(
SAVE_EXPR
,
TREE_TYPE
(
expr
),
t
,
current_function_decl
,
NULL
);
t
=
build
(
SAVE_EXPR
,
TREE_TYPE
(
expr
),
t
,
current_function_decl
,
NULL
_TREE
);
/* This expression might be placed ahead of a jump to ensure that the
value was computed on both sides of the jump. So make sure it isn't
...
...
@@ -2628,7 +2630,7 @@ build_index_type (maxval)
TYPE_ALIGN
(
itype
)
=
TYPE_ALIGN
(
sizetype
);
if
(
TREE_CODE
(
maxval
)
==
INTEGER_CST
)
{
int
maxint
=
TREE_INT_CST_LOW
(
maxval
);
HOST_WIDE_INT
maxint
=
TREE_INT_CST_LOW
(
maxval
);
return
type_hash_canon
(
maxint
>
0
?
maxint
:
-
maxint
,
itype
);
}
else
...
...
@@ -2652,9 +2654,9 @@ build_index_2_type (lowval,highval)
if
((
TREE_CODE
(
lowval
)
==
INTEGER_CST
)
&&
(
TREE_CODE
(
highval
)
==
INTEGER_CST
))
{
int
highint
=
TREE_INT_CST_LOW
(
highval
);
int
lowint
=
TREE_INT_CST_LOW
(
lowval
);
int
maxint
=
highint
-
lowint
;
HOST_WIDE_INT
highint
=
TREE_INT_CST_LOW
(
highval
);
HOST_WIDE_INT
lowint
=
TREE_INT_CST_LOW
(
lowval
);
HOST_WIDE_INT
maxint
=
highint
-
lowint
;
return
type_hash_canon
(
maxint
>
0
?
maxint
:
-
maxint
,
itype
);
}
else
...
...
@@ -2818,7 +2820,8 @@ build_method_type (basetype, type)
which is "this". Put it into the list of argument types. */
TYPE_ARG_TYPES
(
t
)
=
tree_cons
(
NULL
,
build_pointer_type
(
basetype
),
TYPE_ARG_TYPES
(
type
));
=
tree_cons
(
NULL_TREE
,
build_pointer_type
(
basetype
),
TYPE_ARG_TYPES
(
type
));
/* If we already have such a type, use the old one and free this one. */
hashcode
=
TYPE_HASH
(
basetype
)
+
TYPE_HASH
(
type
);
...
...
gcc/varasm.c
View file @
37366632
...
...
@@ -1217,7 +1217,7 @@ assemble_real (d, mode)
abort
();
}
set_float_handler
(
0
);
set_float_handler
(
NULL_PTR
);
}
/* Here we combine duplicate floating constants to make
...
...
@@ -1238,7 +1238,7 @@ static rtx const_double_chain;
rtx
immed_double_const
(
i0
,
i1
,
mode
)
int
i0
,
i1
;
HOST_WIDE_INT
i0
,
i1
;
enum
machine_mode
mode
;
{
register
rtx
r
;
...
...
@@ -1250,22 +1250,24 @@ immed_double_const (i0, i1, mode)
sign bit are all one. So we get either a reasonable negative value
or a reasonable unsigned value for this mode. */
int
width
=
GET_MODE_BITSIZE
(
mode
);
if
(
width
<
HOST_BITS_PER_INT
&&
((
i0
&
((
-
1
)
<<
(
width
-
1
)))
!=
((
-
1
)
<<
(
width
-
1
))))
i0
&=
(
1
<<
width
)
-
1
,
i1
=
0
;
else
if
(
width
==
HOST_BITS_PER_INT
if
(
width
<
HOST_BITS_PER_WIDE_INT
&&
((
i0
&
((
HOST_WIDE_INT
)
(
-
1
)
<<
(
width
-
1
)))
!=
((
HOST_WIDE_INT
)
(
-
1
)
<<
(
width
-
1
))))
i0
&=
((
HOST_WIDE_INT
)
1
<<
width
)
-
1
,
i1
=
0
;
else
if
(
width
==
HOST_BITS_PER_WIDE_INT
&&
!
(
i1
==
~
0
&&
i0
<
0
))
i1
=
0
;
else
if
(
width
>
2
*
HOST_BITS_PER_INT
)
else
if
(
width
>
2
*
HOST_BITS_PER_
WIDE_
INT
)
/* We cannot represent this value as a constant. */
abort
();
/* If MODE fits within HOST_BITS_PER_INT, always use a CONST_INT.
/* If MODE fits within HOST_BITS_PER_
WIDE_
INT, always use a CONST_INT.
??? Strictly speaking, this is wrong if we create a CONST_INT
for a large unsigned constant with the size of MODE being
HOST_BITS_PER_INT and later try to interpret that constant in a wider
mode. In that case we will mis-interpret it as a negative number.
HOST_BITS_PER_WIDE_INT and later try to interpret that constant in a
wider mode. In that case we will mis-interpret it as a negative
number.
Unfortunately, the only alternative is to make a CONST_DOUBLE
for any constant in any mode if it is an unsigned constant larger
...
...
@@ -1276,13 +1278,13 @@ immed_double_const (i0, i1, mode)
We have always been making CONST_INTs in this case, so nothing new
is being broken. */
if
(
width
<=
HOST_BITS_PER_INT
)
if
(
width
<=
HOST_BITS_PER_
WIDE_
INT
)
i1
=
(
i0
<
0
)
?
~
0
:
0
;
/* If this integer fits in one word, return a CONST_INT. */
if
((
i1
==
0
&&
i0
>=
0
)
||
(
i1
==
~
0
&&
i0
<
0
))
return
gen_rtx
(
CONST_INT
,
VOIDmode
,
i0
);
return
GEN_INT
(
i0
);
/* We use VOIDmode for integers. */
mode
=
VOIDmode
;
...
...
@@ -1345,7 +1347,7 @@ immed_real_const_1 (d, mode)
else
if
(
REAL_VALUES_EQUAL
(
dconst1
,
d
))
return
CONST1_RTX
(
mode
);
if
(
sizeof
u
==
2
*
sizeof
(
int
))
if
(
sizeof
u
==
2
*
sizeof
(
HOST_WIDE_INT
))
return
immed_double_const
(
u
.
i
[
0
],
u
.
i
[
1
],
mode
);
/* The rest of this function handles the case where
...
...
@@ -2579,7 +2581,7 @@ output_constant (exp, size)
||
TREE_CODE
(
exp
)
==
NON_LVALUE_EXPR
)
exp
=
TREE_OPERAND
(
exp
,
0
);
if
(
!
assemble_integer
(
expand_expr
(
exp
,
0
,
VOIDmode
,
if
(
!
assemble_integer
(
expand_expr
(
exp
,
NULL_RTX
,
VOIDmode
,
EXPAND_INITIALIZER
),
size
,
0
))
error
(
"initializer for integer value is too complicated"
);
...
...
@@ -2654,7 +2656,7 @@ output_constructor (exp, size)
int
byte_buffer_in_use
=
0
;
register
int
byte
;
if
(
HOST_BITS_PER_INT
<
BITS_PER_UNIT
)
if
(
HOST_BITS_PER_
WIDE_
INT
<
BITS_PER_UNIT
)
abort
();
if
(
TREE_CODE
(
TREE_TYPE
(
exp
))
==
RECORD_TYPE
)
...
...
@@ -2809,26 +2811,27 @@ output_constructor (exp, size)
shift
=
end_offset
-
next_offset
-
this_time
;
/* Don't try to take a bunch of bits that cross
the word boundary in the INTEGER_CST. */
if
(
shift
<
HOST_BITS_PER_INT
&&
shift
+
this_time
>
HOST_BITS_PER_INT
)
if
(
shift
<
HOST_BITS_PER_
WIDE_
INT
&&
shift
+
this_time
>
HOST_BITS_PER_
WIDE_
INT
)
{
this_time
-=
(
HOST_BITS_PER_INT
-
shift
);
shift
=
HOST_BITS_PER_INT
;
this_time
-=
(
HOST_BITS_PER_
WIDE_
INT
-
shift
);
shift
=
HOST_BITS_PER_
WIDE_
INT
;
}
/* Now get the bits from the appropriate constant word. */
if
(
shift
<
HOST_BITS_PER_INT
)
if
(
shift
<
HOST_BITS_PER_
WIDE_
INT
)
{
value
=
TREE_INT_CST_LOW
(
val
);
}
else
if
(
shift
<
2
*
HOST_BITS_PER_INT
)
else
if
(
shift
<
2
*
HOST_BITS_PER_
WIDE_
INT
)
{
value
=
TREE_INT_CST_HIGH
(
val
);
shift
-=
HOST_BITS_PER_INT
;
shift
-=
HOST_BITS_PER_
WIDE_
INT
;
}
else
abort
();
byte
|=
(((
value
>>
shift
)
&
((
1
<<
this_time
)
-
1
))
byte
|=
(((
value
>>
shift
)
&
(((
HOST_WIDE_INT
)
1
<<
this_time
)
-
1
))
<<
(
BITS_PER_UNIT
-
this_time
-
next_bit
));
#else
/* On little-endian machines,
...
...
@@ -2839,24 +2842,25 @@ output_constructor (exp, size)
-
TREE_INT_CST_LOW
(
DECL_FIELD_BITPOS
(
field
)));
/* Don't try to take a bunch of bits that cross
the word boundary in the INTEGER_CST. */
if
(
shift
<
HOST_BITS_PER_INT
&&
shift
+
this_time
>
HOST_BITS_PER_INT
)
if
(
shift
<
HOST_BITS_PER_
WIDE_
INT
&&
shift
+
this_time
>
HOST_BITS_PER_
WIDE_
INT
)
{
this_time
-=
(
HOST_BITS_PER_INT
-
shift
);
shift
=
HOST_BITS_PER_INT
;
this_time
-=
(
HOST_BITS_PER_
WIDE_
INT
-
shift
);
shift
=
HOST_BITS_PER_
WIDE_
INT
;
}
/* Now get the bits from the appropriate constant word. */
if
(
shift
<
HOST_BITS_PER_INT
)
value
=
TREE_INT_CST_LOW
(
val
);
else
if
(
shift
<
2
*
HOST_BITS_PER_INT
)
else
if
(
shift
<
2
*
HOST_BITS_PER_
WIDE_
INT
)
{
value
=
TREE_INT_CST_HIGH
(
val
);
shift
-=
HOST_BITS_PER_INT
;
shift
-=
HOST_BITS_PER_
WIDE_
INT
;
}
else
abort
();
byte
|=
((
value
>>
shift
)
&
((
1
<<
this_time
)
-
1
))
<<
next_bit
;
byte
|=
((
value
>>
shift
)
&
(((
HOST_WIDE_INT
)
1
<<
this_time
)
-
1
))
<<
next_bit
;
#endif
next_offset
+=
this_time
;
byte_buffer_in_use
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment