Richard Henderson
ead1705900
tree.h (TYPE_SIZE_UNIT): New.
...
* tree.h (TYPE_SIZE_UNIT): New.
(struct tree_type): Add size_unit member.
* stor-layout.c (layout_type): Initialize it.
* expr.c (get_inner_reference) [ARRAY_REF]: Use it.
* tree.c (size_in_bytes, int_size_in_bytes): Likewise.
From-SVN: r19853
1998-05-18 06:21:14 -07:00
Richard Earnshaw
069b95ce6d
stor-layout.c (layout_record): Fix off-by-one error when checking length of the TYPE_BINFO vector.
...
* stor-layout.c (layout_record): Fix off-by-one error when checking
length of the TYPE_BINFO vector.
From-SVN: r19850
1998-05-18 08:08:10 -04:00
Jason Merrill
bbc0e64172
tree.h (BINFO_SIZE, [...]): New macros.
...
* tree.h (BINFO_SIZE, TYPE_BINFO_SIZE): New macros.
* stor-layout.c (layout_record): Set it.
* toplev.c (rest_of_compilation): Don't defer nested functions.
From-SVN: r19781
1998-05-15 14:56:11 -04:00
Benjamin Kosnik
c1465d2147
stor-layout.c (set_sizetype): Set TYPE_NAME on bitsizetype.
...
`
Fri May 15 12:44:57 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
* stor-layout.c (set_sizetype): Set TYPE_NAME on bitsizetype.
fixes g++/15561
From-SVN: r19777
1998-05-15 12:50:30 +00:00
Robert Lipe
10f0ad3d49
toplev.h: New file.
...
Wed May 6 06:35:38 1998 Robert Lipe <robertl@dgii.com>
* toplev.h: New file. Protypes for functions in toplev.c.
* tree.h, rtl.h: Deleted protos for functions in toplev.c.
* c-common.c, c-convert.c, c-decl.c, c-iterate.c, c-lex.c,
c-parse.in, c-parse.y, c-pragma.c, c-typeck.c, calls.c,
convert.c, dwarf2out.c, except.c, expr.c, final.c, fold-const.c,
function.c, hash.c, profile.c, real.c, reg-stack.c, regclass.c,
reload.c, reload1.c, stmt.c, stor-layout.c, tlink.c, tree.c,
varasm.c: include it.
From-SVN: r19564
1998-05-06 04:54:01 +00:00
Richard Henderson
896cced482
tree.h (sizetype_tab[2], [...]): Merge all of these into a single struct, with additional [us]sizetype entries.
...
* tree.h (sizetype_tab[2], sbitsizetype, ubitsizetype): Merge all
of these into a single struct, with additional [us]sizetype entries.
* stor-layout.c (set_sizetype): Initialize [us]sizetype.
* fold-const.c (size_int_wide): Don't rely on sizetype_tab being
an array.
From-SVN: r18994
1998-04-04 09:46:06 -08:00
Jeffrey A Law
4e86caed7d
fold-const.c (optimze_bit_field_compare): Initialize rnbitpos, rnbitsize, rnmode and rinner.
...
* fold-const.c optimze_bit_field_compare): Initialize rnbitpos,
rnbitsize, rnmode and rinner.
(make_range): Initialize type.
(fold): Initialize arg0, arg1 and varop.
* function.c (instantiate_virtual_regs_1): Initialize offset, regnoi
and regnor.
(expand_function_start): Initialize last_ptr.
* stor-layout.c (layout_record): Initialize desired_align.
(get_best_mode): Initialize unit.
* tree.c (copy_node): Initialize length.
From-SVN: r18943
1998-04-01 16:35:51 -07:00
Jeffrey A Law
234042f471
Makefile.in (c-typeck.o): Delete on expr.h, insn-codes.h and $(RTL_H).
...
* Makefile.in (c-typeck.o): Delete on expr.h, insn-codes.h and
$(RTL_H).
(stor-layout.o): Likewise.
* c-typeck.c: Include rtl.h and expr.h.
* stor-layout.c: Likewise.
From-SVN: r18894
1998-03-29 04:54:09 -07:00
Kaveh R. Ghazi
670ee92097
Major cutover to using system.h:
...
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
on system.h.
* alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
xcoffout.c: Include system.h. Organize include ordering so
that stdarg/varargs comes before other system headers. Remove
spurious casts of functions assured of a prototype in system.h.
From-SVN: r18726
1998-03-20 14:58:42 +00:00
Richard Henderson
a2d53b285d
stor-layout.c (layout_type): Do upper - lower in the native type, so as to properly handle negative indices.
...
* stor-layout.c (layout_type): Do upper - lower in the native type,
so as to properly handle negative indices.
From-SVN: r17846
1998-02-10 17:43:32 -07:00
J"orn Rennecke
f8dac6eb3f
expr.c (get_inner_reference): Use sbitsizetype for type sizes.
...
* expr.c (get_inner_reference): Use sbitsizetype for type sizes.
* fold-const.c (size_int): Replace with
(size_int_wide).
(make_bit_field_ref): Use bitsize_int for bit position.
* stor-layout.c (sizetype): Delete.
(sizetype_tab, sbitsizetype, ubitsizetype): Declare.
(layout_record, layout_union, layout_type):
Use bitsize_int for bit size.
(set_sizetype): New function.
(make_signed_type, make_unsigned_type): Use it.
* c-decl.c (init_decl_processing): Likewise.
* tree.h (size_int): Don't delcare, #define.
(size_int_wide, sizetype_tab, sbitsize, ubitsize): Declare.
(set_sizetype): Declare.
(bitsize_int, size_int_2, BITS_PER_UNIT_LOG, sizetype, bitsizetype):
Define.
* c-typeck.c (c_sizeof, c_sizeof_nowarn, c_size_in_bytes):
Convert result to sizetype.
(really_start_incremental_init, push_init_level):
Set type of constructor_bit_index to sbitsizetype.
(push_init_level): Use unsigned arithmetic to determine padding.
(output_init_element): Likewise.
From-SVN: r17577
1998-02-01 04:47:59 -07:00
Jeff Law
956d69504d
Merge from gcc-2.8
...
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
e9a25f70a0
Update mainline egcs to gcc2 snapshot 971021.
...
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Mike Stump
5c19a35643
c-decl.c (start_struct): Ensure that structs with forward declarations are in fact packed when...
...
* c-decl.c (start_struct): Ensure that structs with forward
declarations are in fact packed when -fpack-struct is given.
* stor-layout.c (layout_record): Ignore STRUCTURE_SIZE_BOUNDARY if
we are packing a structure. This allows a structure with only
bytes to be aligned on a byte boundary and have no padding on a
m68k.
From-SVN: r15939
1997-10-16 15:45:24 -06:00
Jason Merrill
429baef53a
x
...
From-SVN: r14542
1997-07-28 17:42:09 +00:00
Richard Kenner
9a9b232af8
(layout_record, PCC_BITFIELD_TYPE_MATTERS): Round up when calculating
...
possible end address.
From-SVN: r14326
1997-06-27 10:36:37 -04:00
Mike Stump
db3cf6fb33
reformat a little to match GNU coding standards.
...
From-SVN: r14024
1997-05-06 23:05:54 +00:00
Richard Kenner
d9d08379df
(layout_record, PCC_BITFIELD_TYPE_MATTERS): Fix sign bug in last change.
...
From-SVN: r13892
1997-04-13 15:20:03 -04:00
Richard Kenner
0b364e61d3
(layout_record...
...
(layout_record, PCC_BITFIELD_TYPE_MATTERS): Only add padding if a bit
field would otherwise span more units of alignment than its base type.
From-SVN: r13727
1997-03-17 17:13:37 -05:00
Doug Evans
b5fa331476
stor-layout.c (layout_record): Correct test for whether field spans its unit of alignment in case where...
...
* stor-layout.c (layout_record): Correct test for whether
field spans its unit of alignment in case where
field_size == type_align.
From-SVN: r13540
1997-01-21 18:21:05 +00:00
Jason Merrill
a082c85a43
x
...
From-SVN: r13116
1996-11-09 01:32:56 +00:00
Richard Kenner
1d58084ae0
(layout_record): Treat constant size as variable if it overflows.
...
From-SVN: r13105
1996-11-07 07:39:55 -05:00
Richard Kenner
505d6e2b92
(layout_record): Use HOST_WIDE_INT for size.
...
From-SVN: r13078
1996-10-30 15:53:58 -05:00
Richard Kenner
70e7fabe9e
(GET_MODE_ALIGNMENT): Delete definition; duplicate.
...
From-SVN: r13026
1996-10-24 07:41:09 -04:00
Richard Kenner
1fdae49c42
(layout_decl): Don't turn off DECL_BIT_FIELD if DECL's alignment is
...
less than its type.
From-SVN: r12896
1996-10-04 07:01:47 -04:00
Doug Evans
a5049cf050
(layout_record): Correct overflow test for 0 sized fields.
...
From-SVN: r12593
1996-08-05 20:53:26 +00:00
Mike Stump
1ef08c6373
install EH code
...
From-SVN: r12550
1996-07-23 20:09:26 +00:00
Mike Stump
0f41302f47
formatting tweaks
...
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Richard Kenner
3a369acd31
(layout_decl): Test DECL_PACKED and TYPE_PACKED instead of
...
flag_pack_struct.
From-SVN: r12141
1996-06-03 07:57:30 -04:00
Richard Kenner
977a7752c7
(layout_decl): Turn off DECL_BIT_FIELD for BLKmode that's properly
...
aligned and a multiple of a byte.
From-SVN: r11892
1996-04-26 06:38:48 -04:00
Richard Kenner
d42d380a16
(layout_record): Use ADJUST_FIELD_ALIGN to modify alignment of fields
...
within records.
From-SVN: r11859
1996-04-20 21:22:14 -04:00
Richard Kenner
5bb3d1dded
(layout_decl): Don't make a bitfield an integral mode if the mode of
...
the field type is not MODE_INT.
From-SVN: r11647
1996-03-31 06:18:58 -05:00
Per Bothner
fc69eca06e
stor-layout.c (layout_type): Use same code to layout CHAR_TYPE as for INTEGER_TYPE (instead of hard-wiring...
...
* stor-layout.c (layout_type): Use same code to layout CHAR_TYPE
as for INTEGER_TYPE (instead of hard-wiring in QImode).
From-SVN: r11177
1996-02-06 12:30:34 -08:00
Richard Kenner
e08e713766
(layout_record): When PCC_BITFIELD_TYPE_MATTERS, compute bitpos using
...
field_size % type_align instead of field_size.
From-SVN: r10778
1995-12-16 07:35:45 -05:00
Richard Kenner
e24ff97333
(layout_type...
...
(layout_type, case ARRAY_TYPE): Strip MAX_EXPR from upper bound when
computing length if it just protects against negative length.
From-SVN: r10430
1995-10-03 19:15:52 -04:00
Richard Kenner
1fd7c4ac66
(put_pending_sizes): New function.
...
From-SVN: r10398
1995-09-25 17:50:02 -04:00
Richard Kenner
abc95ed36d
Fix spelling errors.
...
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
e9fa0c7c6f
Update FSF address.
...
From-SVN: r9966
1995-06-15 08:29:51 -04:00
Richard Kenner
76ffb3a0be
(variable_size): Do nothing if SIZE is constant.
...
From-SVN: r9925
1995-06-11 13:59:56 -04:00
Richard Kenner
9faa82d8c0
Fix typos in comments.
...
From-SVN: r9712
1995-05-16 08:39:54 -04:00
Richard Kenner
36427b78ad
(layout_type...
...
(layout_type, case ARRAY_TYPE): Compute length using MAX of length and
zero if sizetype signed and neither bound constant.
From-SVN: r9668
1995-05-12 18:31:57 -04:00
Michael Meissner
566cdc73b6
Add -fpack-struct.
...
From-SVN: r9275
1995-03-31 14:35:03 +00:00
Richard Kenner
6aad19252d
(layout_decl): Allow DECL_BIT_FIELD for any type.
...
From-SVN: r8662
1994-12-18 06:54:29 -05:00
Richard Kenner
9fe0563aff
(layout_type): Use ptr_mode instead of equivalent call to
...
mode_for_size.
From-SVN: r8549
1994-11-22 06:29:12 -05:00
Richard Kenner
e5852cffc2
(variable_size): Return SIZE if it contains a PLACEHOLDER_EXPR.
...
From-SVN: r8318
1994-10-20 09:41:46 -04:00
Per Bothner
b5d11e41da
stor-layout.c (set_alignment): New global.
...
* stor-layout.c (set_alignment): New global.
(layout-type): Add support for SET_TYPE.
From-SVN: r8010
1994-08-31 17:15:03 -07:00
Per Bothner
b02cb287c9
Allow any integral type for bitfields (such as booleans).
...
From-SVN: r7330
1994-05-18 13:51:28 -07:00
Richard Kenner
13275056a7
(layout_type): Use POINTER_SIZE, instead of width of Pmode, when
...
appropriate.
From-SVN: r7275
1994-05-11 16:26:29 -04:00
Per Bothner
a6458cef63
stor-layout.c (layout_type, [...]): Set TREE_UNSIGNED unless TYPE_MIN_VALUE is negative.
...
* stor-layout.c (layout_type, case BOOLEAN_TYPE):
Set TREE_UNSIGNED unless TYPE_MIN_VALUE is negative.
From-SVN: r6808
1994-03-17 21:33:36 -08:00
Richard Kenner
e2a77f994d
(layout_type, case INTEGER_TYPE): Properly test for nonnegative lower
...
bound.
From-SVN: r6803
1994-03-17 06:02:16 -05:00
Richard Kenner
8df0611867
(layout_record): If the place where we were going to put a field
...
changed, lay it out again.
From-SVN: r6793
1994-03-16 06:57:14 -05:00
Richard Kenner
68de38314c
(variable_size): If global_bindings_p < 0, don't even make the
...
SAVE_EXPR.
From-SVN: r6674
1994-02-28 07:37:26 -05:00
Mike Stump
33d7026fec
cp-class.c (finish_struct): Move special C++ only code that handles anonymous unions inside structures here.
...
* cp-class.c (finish_struct): Move special C++ only code that
handles anonymous unions inside structures here.
* stor-layout.c (layout_record): From here.
From-SVN: r5403
1993-09-22 18:43:15 +00:00
Richard Stallman
da57b63af9
(layout_record): Turn off PCC_BITFIELD_TYPE_MATTERS
...
rounding of field bitpos, if maximum_field_alignment is nonzero.
From-SVN: r5318
1993-09-14 12:13:39 +00:00
Richard Kenner
a638896014
(layout_type): Put size-related nodes in same obstack as type.
...
From-SVN: r5079
1993-08-05 19:23:52 -04:00
Richard Kenner
5e9bec999e
Add prototypes for layout_record and layout_union.
...
(smallest_mode_for_size): New function.
(variable_size): Allow variable sizes if global_bindings_p returns a negative
value.
(mode_for_size): Fix incorrect comment.
(layout_decl): If DECL has a size already, don't copy from type.
(layout_type, case INTEGER_TYPE, ENUMERAL_TYPE): Use smallest integer mode
that fits, whether or not it fits exactly.
From-SVN: r4776
1993-06-27 21:14:04 -04:00
Richard Kenner
1aa4cb3a3c
(layout_union): Handle QUAL_UNION_TYPE.
...
(layout_type): Call layout_union for QUAL_UNION_TYPE and treat it
like UNION_TYPE elsewhere.
From-SVN: r4119
1993-04-13 06:48:10 -04:00
Richard Kenner
cbcf989d7f
(layout_record): After copying the offsets of a field that is an anonymous union to the offsets of the fields of that union...
...
(layout_record): After copying the offsets of a field that is an
anonymous union to the offsets of the fields of that union, zero the
offset of the anonymous field in case it is used to access the inner
fields.
From-SVN: r4083
1993-04-11 06:41:55 -04:00
Richard Kenner
93609dfb14
(variable_size): When evaluating sizes of variable types, do so just
...
for side-effects (the SAVE_EXPRs).
From-SVN: r3895
1993-03-27 13:41:31 -05:00
Richard Stallman
80f9c711d9
(variable_size): Better error for div by 0 in size.
...
From-SVN: r3722
1993-03-12 23:17:41 +00:00
Jim Wilson
1375607443
(make_signed_type): Consistently use HOST_BITS_PER_WIDE_INT.
...
(make_signed_type): Consistently use
HOST_BITS_PER_WIDE_INT. Correct minor formatting problems.
(fixup_signed_type): Use HOST_BITS_PER_WIDE_INT and HOST_WIDE_INT
like make_signed_type does.
(fixup_unsigned_type): Correct minor formatting problem.
From-SVN: r3263
1993-01-18 10:41:46 -08:00
Richard Stallman
607207cf7d
(variable_size): Change back to NULL_PTR.
...
From-SVN: r3216
1993-01-13 04:25:24 +00:00
Brendan Kehoe
c958ca9fb6
stor-layout.c (variable_size): Call expand_expr with a NULL_RTX, not a NULL_PTR.
...
* stor-layout.c (variable_size): Call expand_expr with a NULL_RTX,
not a NULL_PTR.
From-SVN: r3208
1993-01-12 18:29:42 -05:00
Richard Stallman
370f6918c2
(layout_record): Avoid overflow in const_size by adding into var_size instead.
...
From-SVN: r3007
1992-12-31 08:33:11 +00:00
Richard Stallman
4cc89e5371
(layout_type): Caller must give size of FILE_TYPE.
...
(layout_type): Handle BOOLEAN_TYPE, CHAR_TYPE, FILE_TYPE for Pascal.
(fixup_signed_type): New function.
From-SVN: r2080
1992-09-09 06:28:36 +00:00
Richard Stallman
e2301a83da
(layout_record): Take account of
...
maximum_field_alignment when using the field's alignment.
From-SVN: r1739
1992-08-01 18:08:36 +00:00
Richard Stallman
e0b382b17a
(layout_record): Handle NULL dsize.
...
From-SVN: r1592
1992-07-15 18:39:27 +00:00
Charles Hannum
c166a31116
entered into RCS
...
From-SVN: r1476
1992-07-06 20:15:06 +00:00
Richard Stallman
d4c40650c2
*** empty log message ***
...
From-SVN: r1355
1992-06-30 03:10:06 +00:00
Richard Kenner
77fa0940a0
*** empty log message ***
...
From-SVN: r1223
1992-06-20 06:51:46 -04:00
Tom Wood
77f934bbbf
*** empty log message ***
...
From-SVN: r732
1992-04-13 10:58:19 +00:00
Tom Wood
cdc54cc9f9
*** empty log message ***
...
From-SVN: r729
1992-04-12 14:34:57 +00:00
Richard Kenner
e7c33f5411
*** empty log message ***
...
From-SVN: r652
1992-03-31 18:13:36 -05:00
Richard Stallman
23ad4d4130
*** empty log message ***
...
From-SVN: r619
1992-03-29 03:05:58 +00:00
Richard Stallman
4e4b555d33
*** empty log message ***
...
From-SVN: r451
1992-03-12 04:27:36 +00:00
Michael Tiemann
321cb743c7
*** empty log message ***
...
From-SVN: r389
1992-03-04 07:29:59 +00:00
Jim Wilson
7306ed3fb6
Initial revision
...
From-SVN: r348
1992-02-18 17:07:30 -08:00