diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2003-10-25 02:03:40 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2003-10-25 02:03:40 +0000 |
commit | 02befdf47ff01246c47ddc7d4f3985aa2d990d8e (patch) | |
tree | 924272e8a87e09c7f5bd7aa5ee638d29f45b3b8b /gcc/varasm.c | |
parent | 569827c9b6b729159228cd3959c6a26ac6e391ed (diff) | |
download | gcc-02befdf47ff01246c47ddc7d4f3985aa2d990d8e.zip gcc-02befdf47ff01246c47ddc7d4f3985aa2d990d8e.tar.gz gcc-02befdf47ff01246c47ddc7d4f3985aa2d990d8e.tar.bz2 |
genmodes.c (struct mode_data): Add contained and next_cont fields.
* genmodes.c (struct mode_data): Add contained and next_cont
fields.
(complete_mode): Maintain linked list of modes that have a
given component.
(emit_mode_unit_size): Delete.
(emit_mode_nunits): New.
(emit_insn_modes_c): Update to match.
(emit_mode_adjustments): Propagate size and alignment
adjustments from component modes to their containers.
* machmode.h (mode_unit_size): Delete.
(mode_nunits): New.
(GET_MODE_NUNITS): Just return the value in the table.
(GET_MODE_UNIT_SIZE): Compute using GET_MODE_INNER and
GET_MODE_SIZE.
* expmed.c (store_bit_field, extract_bit_field): Can use a
plain move instruction if bitsize >= GET_MODE_BITSIZE of
destination/source mode, respectively.
* varasm.c (assemble_real): Write out the full size of the
constant, not just its bitsize.
(output_constant): Honor TYPE_MODE of TREE_REAL_CSTs.
* config/ia64/ia64-modes.def: Define XFmode as well as TFmode.
Use ADJUST_BYTESIZE and ADJUST_ALIGNMENT to set size and
alignment of XF and TF modes in compliance with ia64 ABIs.
Can now hardwire the format of both modes.
* config/ia64/ia64.c: Change TFmode to XFmode wherever appropriate.
(general_tfmode_operand, destination_tfmode_operand)
(tfreg_or_fp01_operand, spill_tfmode_operand): Rename to
general_xfmode_operand, destination_xfmode_operand,
xfreg_or_fp01_operand, spill_xfmode_operand respectively.
(ia64_init_builtins): Make TYPE_PRECISION of fpreg_type
and float80_type be 96 so they get XFmode. Use !TARGET_HPUX,
not INTEL_EXTENDED_IEEE_FORMAT, to decide how to define
__float128.
* config/ia64/ia64.h: Default TARGET_HPUX to 0.
Change TFmode to XFmode wherever appropriate. Remove all
references to INTEL_EXTENDED_IEEE_FORMAT.
(LONG_DOUBLE_TYPE_SIZE): Varies with TARGET_HPUX.
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Define (always 96).
(PREDICATE_CODES): Update to match function renames.
* config/ia64/ia64.md: Change TF to XF throughout; rename all
patterns to match. Remove all references to
INTEL_EXTENDED_IEEE_FORMAT. Update predicate calls to match
function renames.
* config/ia64/ia64-protos.c: Update all prototypes to match
renamed functions.
* config/ia64/hpux.h: Redefine TARGET_HPUX to 1.
Remove all references to INTEL_EXTENDED_IEEE_FORMAT.
* config/ia64/lib1funcs.asm: Add __divxf3 as new name for
__divtf3; keep old name for backward compatibility.
(L__compat): New section providing forwarding stubs for
__fixtfti, __fixunstfti, __floattitf.
* config/ia64/t-ia64: Add __compat to LIB1ASMFUNCS.
From-SVN: r72916
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 29bc605..791b8ad 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1905,15 +1905,20 @@ assemble_real (REAL_VALUE_TYPE d, enum machine_mode mode, unsigned int align) int i; int bitsize, nelts, nunits, units_per; - /* This is hairy. We have a quantity of known bitsize. real_to_target + /* This is hairy. We have a quantity of known size. real_to_target will put it into an array of *host* longs, 32 bits per element (even if long is more than 32 bits). We need to determine the number of array elements that are occupied (nelts) and the number of *target* min-addressable units that will be occupied in the - object file (nunits). We can assume that BITS_PER_UNIT divides - the mode's bitsize evenly, but we can not assume that 32 does. */ - bitsize = GET_MODE_BITSIZE (mode); - nunits = bitsize / BITS_PER_UNIT; + object file (nunits). We cannot assume that 32 divides the + mode's bitsize (size * BITS_PER_UNIT) evenly. + + size * BITS_PER_UNIT is used here to make sure that padding bits + (which might appear at either end of the value; real_to_target + will include the padding bits in its output array) are included. */ + + nunits = GET_MODE_SIZE (mode); + bitsize = nunits * BITS_PER_UNIT; nelts = CEIL (bitsize, 32); units_per = 32 / BITS_PER_UNIT; @@ -3756,9 +3761,7 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) if (TREE_CODE (exp) != REAL_CST) error ("initializer for floating value is not a floating constant"); - assemble_real (TREE_REAL_CST (exp), - mode_for_size (size * BITS_PER_UNIT, MODE_FLOAT, 0), - align); + assemble_real (TREE_REAL_CST (exp), TYPE_MODE (TREE_TYPE (exp)), align); break; case COMPLEX_TYPE: |