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
dbb5c281
Commit
dbb5c281
authored
May 02, 2004
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert my previous store_constructor* change
From-SVN: r81417
parent
02c672d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
42 deletions
+25
-42
gcc/ChangeLog
+0
-6
gcc/expr.c
+25
-36
No files found.
gcc/ChangeLog
View file @
dbb5c281
...
...
@@ -194,12 +194,6 @@
(EXTRA_SPECS): Don't use CPP_*ARCH*_SPEC.
(FPUTYPE_DEFAULT): Don't define here.
2004-04-30 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* expr.c (store_constructor): SIZE operand is now in bits; CLEARED
less than zero now means emitted CLOBBER already.
(store_constructor_field, expand_expr_real): Reflect above changes.
2004-04-30 J"orn Rennecke <joern.rennecke@superh.com>
* flow.c (propagate_one_insn): Call mark_set_regs for stack pointer
...
...
gcc/expr.c
View file @
dbb5c281
...
...
@@ -4515,7 +4515,7 @@ store_constructor_field (rtx target, unsigned HOST_WIDE_INT bitsize,
set_mem_alias_set
(
target
,
alias_set
);
}
store_constructor
(
exp
,
target
,
cleared
,
bitsize
);
store_constructor
(
exp
,
target
,
cleared
,
bitsize
/
BITS_PER_UNIT
);
}
else
store_field
(
target
,
bitsize
,
bitpos
,
mode
,
exp
,
VOIDmode
,
0
,
type
,
...
...
@@ -4525,10 +4525,8 @@ store_constructor_field (rtx target, unsigned HOST_WIDE_INT bitsize,
/* Store the value of constructor EXP into the rtx TARGET.
TARGET is either a REG or a MEM; we know it cannot conflict, since
safe_from_p has been called.
CLEARED is positive if TARGET is known to have been zeroed, zero if
this is the top level of calls to store_constructor, and negative
if this is a recursive call but no clearing has been done.
SIZE is the number of bits of TARGET we are allowed to modify: this
CLEARED is true if TARGET is known to have been zero'd.
SIZE is the number of bytes of TARGET we are allowed to modify: this
may not be the same as the size of EXP if we are assigning to a field
which has been packed to exclude padding bits. */
...
...
@@ -4545,11 +4543,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
{
tree
elt
;
/* If this is not the top level, we don't do any initialization. */
if
(
cleared
)
;
/* If the size is zero, pretend we've cleared it. */
else
if
(
size
==
0
)
/* If size is zero or the target is already cleared, do nothing. */
if
(
size
==
0
||
cleared
)
cleared
=
1
;
/* We either clear the aggregate or indicate the value is dead. */
else
if
((
TREE_CODE
(
type
)
==
UNION_TYPE
...
...
@@ -4557,7 +4552,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
&&
!
CONSTRUCTOR_ELTS
(
exp
))
/* If the constructor is empty, clear the union. */
{
clear_storage
(
target
,
GEN_INT
(
size
/
BITS_PER_UNIT
));
clear_storage
(
target
,
expr_size
(
exp
));
cleared
=
1
;
}
...
...
@@ -4580,7 +4575,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
else
if
(((
list_length
(
CONSTRUCTOR_ELTS
(
exp
))
!=
fields_length
(
type
))
||
mostly_zeros_p
(
exp
))
&&
(
GET_CODE
(
target
)
!=
REG
||
((
HOST_WIDE_INT
)
GET_MODE_
BIT
SIZE
(
GET_MODE
(
target
))
||
((
HOST_WIDE_INT
)
GET_MODE_SIZE
(
GET_MODE
(
target
))
==
size
)))
{
rtx
xtarget
=
target
;
...
...
@@ -4591,14 +4586,12 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
RTX_UNCHANGING_P
(
xtarget
)
=
1
;
}
clear_storage
(
xtarget
,
GEN_INT
(
size
/
BITS_PER_UNIT
));
clear_storage
(
xtarget
,
GEN_INT
(
size
));
cleared
=
1
;
}
else
{
emit_insn
(
gen_rtx_CLOBBER
(
VOIDmode
,
target
));
cleared
=
-
1
;
}
if
(
!
cleared
)
emit_insn
(
gen_rtx_CLOBBER
(
VOIDmode
,
target
));
/* Store each element of the constructor into
the corresponding field of TARGET. */
...
...
@@ -4619,7 +4612,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
if
(
field
==
0
)
continue
;
if
(
cleared
>
0
&&
is_zeros_p
(
value
))
if
(
cleared
&&
is_zeros_p
(
value
))
continue
;
if
(
host_integerp
(
DECL_SIZE
(
field
),
1
))
...
...
@@ -4830,17 +4823,13 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
if
(
REG_P
(
target
))
emit_move_insn
(
target
,
CONST0_RTX
(
GET_MODE
(
target
)));
else
clear_storage
(
target
,
GEN_INT
(
size
/
BITS_PER_UNIT
));
cleared
=
1
;
clear_storage
(
target
,
GEN_INT
(
size
));
}
cleared
=
1
;
}
else
if
(
REG_P
(
target
))
{
/* Inform later passes that the old value is dead. */
emit_insn
(
gen_rtx_CLOBBER
(
VOIDmode
,
target
));
cleared
=
-
1
;
}
/* Inform later passes that the old value is dead. */
emit_insn
(
gen_rtx_CLOBBER
(
VOIDmode
,
target
));
/* Store each element of the constructor into
the corresponding element of TARGET, determined
...
...
@@ -4857,7 +4846,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
tree
index
=
TREE_PURPOSE
(
elt
);
rtx
xtarget
=
target
;
if
(
cleared
>
0
&&
is_zeros_p
(
value
))
if
(
cleared
&&
is_zeros_p
(
value
))
continue
;
unsignedp
=
TYPE_UNSIGNED
(
elttype
);
...
...
@@ -4951,7 +4940,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
highest_pow2_factor
(
position
));
xtarget
=
adjust_address
(
xtarget
,
mode
,
0
);
if
(
TREE_CODE
(
value
)
==
CONSTRUCTOR
)
store_constructor
(
value
,
xtarget
,
cleared
,
bitsize
);
store_constructor
(
value
,
xtarget
,
cleared
,
bitsize
/
BITS_PER_UNIT
);
else
store_expr
(
value
,
xtarget
,
0
);
...
...
@@ -5049,8 +5039,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
/* Check for all zeros. */
if
(
elt
==
NULL_TREE
&&
size
>
0
)
{
if
(
cleared
<=
0
)
clear_storage
(
target
,
GEN_INT
(
size
/
BITS_PER_UNIT
));
if
(
!
cleared
)
clear_storage
(
target
,
GEN_INT
(
size
));
return
;
}
...
...
@@ -5090,7 +5080,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
bit_pos
++
;
ibit
++
;
if
(
bit_pos
>=
set_word_size
||
ibit
==
nbits
)
{
if
(
word
!=
0
||
cleared
<=
0
)
if
(
word
!=
0
||
!
cleared
)
{
rtx
datum
=
gen_int_mode
(
word
,
mode
);
rtx
to_rtx
;
...
...
@@ -5115,7 +5105,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
}
}
}
else
if
(
cleared
<=
0
)
else
if
(
!
cleared
)
/* Don't bother clearing storage if the set is all ones. */
if
(
TREE_CHAIN
(
elt
)
!=
NULL_TREE
||
(
TREE_PURPOSE
(
elt
)
==
NULL_TREE
...
...
@@ -5125,7 +5115,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
||
(
tree_low_cst
(
TREE_VALUE
(
elt
),
0
)
-
tree_low_cst
(
TREE_PURPOSE
(
elt
),
0
)
+
1
!=
(
HOST_WIDE_INT
)
nbits
))))
clear_storage
(
target
,
GEN_INT
(
size
/
BITS_PER_UNIT
));
clear_storage
(
target
,
expr_size
(
exp
));
for
(;
elt
!=
NULL_TREE
;
elt
=
TREE_CHAIN
(
elt
))
{
...
...
@@ -6753,8 +6743,7 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode,
*
TYPE_QUAL_CONST
))),
0
,
TREE_ADDRESSABLE
(
exp
),
1
);
store_constructor
(
exp
,
target
,
0
,
int_expr_size
(
exp
)
*
BITS_PER_UNIT
);
store_constructor
(
exp
,
target
,
0
,
int_expr_size
(
exp
));
return
target
;
}
...
...
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