Commit Graph

325 Commits

Author SHA1 Message Date
Richard Kenner
7f62854a80 (get_inner_reference): Don't ignore CONVERT_EXPR from non-UNION_TYPE to UNION_TYPE.
(get_inner_reference): Don't ignore CONVERT_EXPR from non-UNION_TYPE
to UNION_TYPE.
(expand_expr, case CONVERT_EXPR): Check for conversion to union before
checking for not changing mode.

From-SVN: r8772
1995-01-18 07:43:31 -05:00
Richard Kenner
e6d8c385f3 (get_inner_reference): Only treat offset of PLUS_EXPR as special if
second arg is integer constant.

From-SVN: r8762
1995-01-14 17:49:47 -05:00
Jeff Law
3668e76e90 calls.c (expand_call): Set MEM_IN_STRUCT_P as needed on return value from assign_stack_temp.
* calls.c (expand_call): Set MEM_IN_STRUCT_P as needed on return
	value from assign_stack_temp.
	(store_one_arg): Likewise.
	* expr.c (save_noncopied_parts): Likewise.
	(expand_expr): Likewise.
	* function.c (assign_parms): Likewise.
	* integrate.c (expand_inline_function): Likewise.
	* stmt.c (expand_decl): Likewise.

From-SVN: r8708
1994-12-29 19:50:28 -07:00
Richard Kenner
cd11b87e6a (store_constructor): Properly get constant part of bit position when
DECL_FIELD_BITPOS is a PLUS_EXPR.

From-SVN: r8655
1994-12-15 07:49:16 -05:00
Richard Kenner
1b604ae412 (get_inner_reference): Use EXACT_DIV_EXPR to compute byte offset from
bit offset.

From-SVN: r8654
1994-12-14 19:01:13 -05:00
Richard Kenner
ae4311830e (expand_expr, case MINUS_EXPR): Properly handle case when the NEGATE
overflows.

From-SVN: r8648
1994-12-13 07:50:58 -05:00
Per Bothner
071a659510 * expr.c (store_constructor): Add support for SET_TYPE.
From-SVN: r8604
1994-12-02 20:17:51 -08:00
Richard Kenner
5c5033c3c7 (convert_move): When emit multiword conversion, force FROM into a new
pseudo-reg if it overlaps TO.

From-SVN: r8593
1994-11-30 19:07:49 -05:00
Richard Kenner
8ca00751f7 (emit_block_move): Only use movstr if size is small enough constant or
MODE is at least BITS_PER_WORD.

From-SVN: r8585
1994-11-30 18:13:44 -05:00
Jeff Law
aaf87c453b expr.c (expand_assignment): For BLKmode structure returns...
* expr.c (expand_assignment): For BLKmode structure returns,
	copy the return value from registers into the target memory
	locations.

From-SVN: r8575
1994-11-28 22:44:19 -07:00
Jim Wilson
c7a7ac465e (move_by_pieces, move_by_pieces_ninsns, emit_push_insn,
expand_assignment, store_field, expand_expr): Likewise.
(SLOW_UNALIGNED_ACCESS): Default to STRICT_ALIGNMENT, not zero.

From-SVN: r8569
1994-11-28 16:58:52 -08:00
Richard Kenner
a98c9f1ab2 (emit_move_insn): If splitting up into individual words and X is a push_operand...
(emit_move_insn): If splitting up into individual words and X is a
push_operand, do the push and reference top of stack.

From-SVN: r8554
1994-11-23 13:30:35 -05:00
Richard Kenner
5a32d03841 (convert_move): Don't put FROM in a register if it is a SUBREG.
(store_expr): If don't want a value and storing into promoted
variable, do conversion at tree level; don't copy volatile MEM unless
want value, as comment says.

From-SVN: r8466
1994-11-16 07:47:58 -05:00
Richard Kenner
2e5ec6cf3b (do_jump_by_parts_greater_rtx): No longer static.
(expand_expr): Delete code for plain `abs'.

From-SVN: r8443
1994-11-15 18:35:35 -05:00
Richard Kenner
2d44400163 (expand_expr, COND_EXPR case): Don't use original target as a temp if it's a volatile mem ref.
(expand_expr, COND_EXPR case): Don't use original target as a temp if
it's a volatile mem ref.  Finish previous patch (don't expand "X ? A &
1 : A" as "A & (X != 0)").

From-SVN: r8369
1994-10-31 08:11:19 -05:00
Richard Kenner
7a0b7b9a97 (expand_expr, case COMPONENT_REF): Don't extract field from a CONSTRUCTOR if it already has a TREE_CST_RTL.
(expand_expr, case COMPONENT_REF): Don't extract field from a CONSTRUCTOR if
it already has a TREE_CST_RTL.
(expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken on the temporary made
when operand needs to be stored into memory.

From-SVN: r8362
1994-10-31 07:23:35 -05:00
Doug Evans
9fbd9f58d7 (expand_expr, COND_EXPR case): Don't expand "X ? A & 1 : A" as "A & (X != 0)".
From-SVN: r8345
1994-10-26 22:22:06 +00:00
Richard Kenner
b9bcad654a (convert_move): Add TImode conversions.
From-SVN: r8248
1994-10-10 19:19:32 -04:00
Richard Kenner
45524ce90e Fix typo in last change.
From-SVN: r8236
1994-10-07 08:36:00 -04:00
Richard Kenner
6676e72f96 (safe_from_p): If EXP has a variable size, assume safe.
(preexpand_calls): Don't preexpand a call that returns a variable-sized object.

From-SVN: r8234
1994-10-07 08:26:47 -04:00
Richard Kenner
22619c3f61 (store_expr): Don't clobber TEMP with address.
From-SVN: r8227
1994-10-06 07:25:21 -04:00
Richard Kenner
af5b53ed8d (expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken.
From-SVN: r8225
1994-10-06 06:53:40 -04:00
Richard Kenner
41dfd40ca0 Fix error in last change.
From-SVN: r8215
1994-10-04 21:42:54 -04:00
Richard Kenner
34661f5c30 (do_jump_for_compare): Properly scan insns when branch is at start of
sequence.

From-SVN: r8214
1994-10-04 19:06:09 -04:00
Jim Wilson
1899299599 (result_vector): Use INCOMING_REGNO when !savep instead
of when savep.

From-SVN: r8170
1994-09-29 17:02:36 -07:00
Mike Stump
7ee055f4ae expr.c (do_jump): Handle cleanups in TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
* expr.c (do_jump): Handle cleanups in TRUTH_ANDIF_EXPR and
        TRUTH_ORIF_EXPR.

From-SVN: r8164
1994-09-29 20:45:05 +00:00
Richard Kenner
0407367d53 (convert_move): Added handling of PDImode conversions.
From-SVN: r8161
1994-09-28 19:32:44 -04:00
Richard Kenner
809ab85718 (emit_move_insn_1): Never make a no-conflict block.
From-SVN: r7951
1994-08-19 19:23:00 -04:00
Richard Kenner
ba558a85d2 (expand_builtin): Relegate sin and cos to ffast-math.
From-SVN: r7886
1994-08-11 12:56:59 -04:00
Jason Merrill
fd67d2b620 (expand_expr...
(expand_expr, COND_EXPR case): Use truthvalue_conversion
        to make the condition for running cleanups acceptable to
        invert_truthvalue.

From-SVN: r7861
1994-08-05 19:02:42 +00:00
Jason Merrill
4ea8537b90 (defer_cleanups_to): Put back line which was mistakenly
removed.

From-SVN: r7857
1994-08-05 01:49:31 +00:00
Richard Kenner
72bb971732 (move_block_to_reg): Do nothing if NREGS == 0.
From-SVN: r7820
1994-07-29 17:36:13 -04:00
Richard Kenner
62acb9781f (expand_expr, case CONJ_EXPR): Use correct mode for parts of a complex
expression.

From-SVN: r7815
1994-07-28 19:48:33 -04:00
Richard Kenner
ad2e7dd004 (expand_expr, case ARRAY_REF): Don't fold L"foo"[2].
From-SVN: r7797
1994-07-26 19:45:11 -04:00
Jim Wilson
24a13950ca (store_field): Set MEM_IN_STRUCT_P on object and
blk_object.

From-SVN: r7767
1994-07-13 13:35:03 -07:00
Richard Kenner
03747aa399 (convert_move): Add some conversions for TQFmode.
From-SVN: r7733
1994-07-11 19:27:23 -04:00
Richard Kenner
e74a220154 (expand_builtin, case BUILT_IN_FSQRT): Don't use asterisk in name of
`errno'.

From-SVN: r7695
1994-07-10 06:02:49 -04:00
Richard Kenner
5069803972 (expand_expr, case CONVERT_EXPR): If changing signedness and we have a
promoted SUBREG, clear the promotion flag.

From-SVN: r7686
1994-07-08 18:22:46 -04:00
Jim Wilson
6be583037c (get_inner_unaligned_p): New function.
(expand_assignment, expand_expr): Use it.

From-SVN: r7685
1994-07-08 14:41:02 -07:00
Mike Stump
d93d4205f1 fix temp lifetime (FOR TARGET_EXPRs only)
From-SVN: r7681
1994-07-08 20:45:14 +00:00
Mike Stump
61d6b1cca1 expr.c (expand_expr, [...]): All cleanups have to be protected by interim exception handling code.
* expr.c (expand_expr, defer_cleanups_to, expand_cleanups_to): All
        cleanups have to be protected by interim exception handling code.
        * stmt.c (expand_decl_cleanup, expand_cleanups): Ditto.
        * toplev.c (interim_eh_hook): Hook for interim exception handling.
        * toplev.c (interim_eh): Default implementation for exception
        handling that does nothing.
        * toplev.c (main): Set default for interim_eh_hook.

From-SVN: r7666
1994-07-07 03:08:23 +00:00
Richard Kenner
3e073e7297 (expand_increment): If pre-incrementing a promoted variable, don't
adjust OP0 since the result won't be used.

From-SVN: r7655
1994-07-05 18:27:27 -04:00
Richard Kenner
2f6e6d22ea (do_jump, case BIT_AND_EXPR): Only narrow to a type that corresponds
to a mode.

From-SVN: r7580
1994-06-28 05:44:57 -04:00
Richard Kenner
119af78aa8 (expand_expr, case ADDR_EXPR): If result is ignored, just return
const0_rtx.

From-SVN: r7421
1994-06-02 08:13:33 -04:00
Richard Kenner
94b25f81ca Update comments.
From-SVN: r7420
1994-06-02 07:24:33 -04:00
Doug Evans
0304dfbb67 expr.c (use_reg): Fix recording of USE information.
* expr.c (use_reg): Fix recording of USE information.
	(use_regs): Likewise.
	Delete argument `reg'.  All callers changed.
	* expr.h (use_regs): Update prototype.
	* calls.c (expand_call): Update call to use_regs.  Call use_reg
	if parm is wholly in registers.

From-SVN: r7378
1994-05-27 23:27:50 +00:00
Richard Kenner
d720b9d197 (expand_expr...
(expand_expr, case CONSTRUCTOR): If constant and large enough for
memcpy to be used, build constructor into static memory.

From-SVN: r7365
1994-05-27 14:56:31 -04:00
Richard Kenner
4ac0968744 Use #ifdef TARGET_EDOM, not #if.
From-SVN: r7307
1994-05-16 16:18:54 -04:00
Richard Kenner
930b4e398e (convert_move): When {zero,sign}_extending, allow a wider intermediate
than to_mode if truncation is a no-op.

From-SVN: r7306
1994-05-16 16:16:12 -04:00
Mike Stump
5dab5552a1 calls.c (expand_call): Only destroy temporaries at the end of function calls, if flag_short_temps is set.
* calls.c (expand_call): Only destroy temporaries at the end
        of function calls, if flag_short_temps is set.
        * expr.c (safe_from_p, expand_expr): Handle CLEANUP_POINT_EXPRs.
        * expr.c (expand_expr): Improve handling of temporaries inside
        COND_EXPRs, cures call to sorry.
        * expr.c (defer_cleanups_to): New routine to handle the deferral
        of cleanups.
        * flags.h (flag_short_temps): New flag, to allow better control
        over the lifetime of temporaries.
        * toplev.c (flag_short_temps, lang_options): Ditto.
        * tree.def (CLEANUP_POINT_EXPR): Add, to allow better control over
        the lifetime of temporaries.

From-SVN: r7289
1994-05-13 00:19:57 +00:00
Richard Kenner
6d100794d0 (expand_builtin_apply): Put new function usage data at end of any data
already there.

From-SVN: r7274
1994-05-11 16:23:11 -04:00
Richard Kenner
b3f8cf4ab9 (use_regs, expand_builtin_apply): Change from USE and CLOBBER insns to
using CALL_INSN_FUNCTION_USAGE.

From-SVN: r7240
1994-05-06 17:47:35 -04:00
Richard Kenner
1ee86d1598 (expand_builtin...
(expand_builtin, case BUILT_IN_ALLOCA): Don't set
current_function_calls_alloca here nor record new stack level for
nonlocal gotos.

From-SVN: r7230
1994-05-06 13:44:56 -04:00
Mike Stump
d3158f1a23 tell expand_expr that we are going to ignore the cleanup.
TREE_SIDE_EFFECTS should be set on these things.

From-SVN: r7222
1994-05-06 10:13:17 +00:00
Mike Stump
19d3f3c523 minor tweak.
From-SVN: r7220
1994-05-06 09:02:42 +00:00
Doug Evans
33162bebd8 (expand_builtin): Fix typo in previous patch
(allow __builtin_next_arg in varargs functions).

From-SVN: r7164
1994-04-28 16:39:50 +00:00
Per Bothner
05e3bdb9cb Use new macro AGGREGATE_TYPE_P.
From-SVN: r7160
1994-04-26 16:56:21 -07:00
Richard Kenner
e70d22c84f (expand_expr, case SAVE_EXPR): Fix error in last change.
From-SVN: r7141
1994-04-24 11:17:02 -04:00
Jim Wilson
c1da1f33b7 (store_expr): Don't check the TYPE_MODE of an ERROR_MARK.
From-SVN: r7122
1994-04-21 12:46:31 -07:00
Richard Kenner
9bac07c3dd (bc_expand_expr): Call expand_decl and expand_decl_init, not the bc_
versions.

From-SVN: r7114
1994-04-21 15:28:59 -04:00
Jason Merrill
6fcc9690b3 (expand_expr): Don't force ignore when expanding the subexpression of a WITH_CLEANUP_EXPR.
(expand_expr): Don't force ignore when expanding the
        subexpression of a WITH_CLEANUP_EXPR.  Don't check ignore when
        deciding whether or not to expand the cleanup for a TARGET_EXPR.

From-SVN: r7100
1994-04-20 18:12:36 +00:00
Doug Evans
bf76bb5a49 #include regs.h.
#include regs.h.
(use_regs): Use reg_raw_mode.

From-SVN: r7085
1994-04-20 03:34:57 +00:00
Richard Kenner
ccfa6cbb7b (expand_builtin_apply): Pass new arg to prepare_call_address.
From-SVN: r7074
1994-04-18 16:37:34 -04:00
Richard Kenner
78911e8b93 (expand_expr, case VAR_DECL, SAVE_EXPR): Use promote_mode.
From-SVN: r7069
1994-04-18 14:52:26 -04:00
Richard Kenner
e4493c0410 (expand_builtin, case BUILT_IN_NEXT_ARG): Test whether an argunment
has been passed to __builtin_next_arg; warn if not.

From-SVN: r6994
1994-04-06 21:33:57 -04:00
Richard Kenner
17bbab26bb (expand_builtin): Allow builtin_next_arg for varargs functions as
well.

From-SVN: r6984
1994-04-06 07:48:06 -04:00
Richard Kenner
682ba3a67b (expand_expr, case ADDR_EXPR): Return const0_rtx if taking address of
an ERROR_MARK; also do some minor cleanup.

From-SVN: r6908
1994-03-25 19:53:32 -05:00
Richard Kenner
3d0f0ad043 (expand_expr, case ABS_EXPR): Compare with 0 of proper mode.
From-SVN: r6901
1994-03-25 17:02:56 -05:00
Jim Wilson
c4dfe0fc06 (expand_builtin, BUILT_IN_NEXT_ARG case): Verify that
parameter is last named argument.

From-SVN: r6854
1994-03-23 14:16:55 -08:00
Richard Kenner
987c71d9bc (expand_expr, case ADDR_EXPR): Update temp slot address if we put it
in a register; mark result as pointer.

From-SVN: r6842
1994-03-21 17:14:41 -05:00
Jim Wilson
eedd251f16 (expand_expr, case ABS_EXPR): Fix typo in last change.
From-SVN: r6827
1994-03-19 14:43:50 -08:00
Richard Kenner
d6a5ac336d (expand_expr): Update comments and fix formatting.
(expand_expr, case VAR_DECL, STRING_CST, CONSTRUCTOR): If flag_force_addr, put
address in register unless REG.
(expand_expr, case CONSTRUCTOR, CONVERT_EXPR): Make TARGET with TMODE, if
specified.
(expand_expr, case IN_EXPR): Clean up.  Allow INDEX to be an unsigned type.
Always evaluate SET and INDEX in case of side effects.
(expand_expr, case CONVERT_EXPR): Use convert_modes to handle consts.
(expand_expr, case ABS_EXPR): Simplify processing of COMPLEX.
Compare with zero word-by-word if required.
(expand_expr, case ABS_EXPR, MIN_EXPR, COND_EXPR): Don't use TARGET if
not MODE.
(expand_expr, case TRUTH_*_EXPR): Modes of input and output must agree.
(expand_expr, case CONJ_EXPR): Remove redundant def of MODE.

From-SVN: r6794
1994-03-16 08:24:29 -05:00
Richard Kenner
1d556704ce (expand_expr): Don't call bc_expand_expr if EXPAND_INITIALIZER.
From-SVN: r6781
1994-03-14 08:11:32 -05:00
Richard Kenner
153c149bec (expand_builtin, case BUILT_IN_RETURN_ADDRESS): Call tree_int_cst_sgn.
From-SVN: r6778
1994-03-14 05:10:47 -05:00
Doug Evans
1f584163ee (convert_move): Change name of truncsipsi to truncsipsi2
to conform to existing convention, same with extendpsisi.

From-SVN: r6678
1994-02-28 23:31:01 +00:00
Richard Kenner
d0c766547a (emit_move_insn): Delete unused vars.
(emit_move_insn_1): Don't set SUBMODE unless used.
(expand_builtin, case BUILT_IN_SAVEREGS): Clean up uses of VALREG
and SAVED_VALREG.

From-SVN: r6642
1994-02-27 10:47:10 -05:00
Richard Kenner
766f36c7cf (store_expr): In promoted TARGET case, if EXP is a volatile MEM and WANT_VALUE is nonzero, only reference the MEM once.
(store_expr): In promoted TARGET case, if EXP is a volatile MEM and
WANT_VALUE is nonzero, only reference the MEM once.
Return TARGET if it is a hard register; clean up return code.

From-SVN: r6630
1994-02-26 16:09:05 -05:00
Jim Wilson
8dc2fbcff4 (get_pointer_alignment): ALIGN is alignment of innermost
object, not the MAX of alignment of all objects.

From-SVN: r6579
1994-02-16 13:01:02 -08:00
Jim Wilson
6551fa4d72 (group_insns): Delete.
(emit_move_insn_1, expand_expr): Use emit_no_conflict_block
instead of group_insns.

From-SVN: r6578
1994-02-16 12:57:27 -08:00
Per Bothner
4042d44040 Use new flag TYPE_STRING_FLAG instead of STRING_TYPE.
From-SVN: r6570
1994-02-15 19:52:30 -08:00
Richard Kenner
79777b798c (expand_increment): Handle both BAD_SUBREG and POST.
From-SVN: r6567
1994-02-15 19:30:29 -05:00
Richard Kenner
98aad28669 (expand_builtin): If the builtin was called as __builtin_whatever,
pretend we're optimizing.

From-SVN: r6529
1994-02-11 17:35:51 -05:00
Jim Wilson
186f92ce97 (local_vars_size): Add extern to declaration.
From-SVN: r6443
1994-01-31 14:24:34 -08:00
Richard Kenner
127e4d19bd (do_jump_for_compare): Initialize JUMP_LABEL for the branch insn
before trying to invert it.

From-SVN: r6418
1994-01-23 18:56:41 -05:00
Richard Kenner
976ff203d8 (emit_move_insn_1): Call gen_realpart and gen_imagpart instead of
gen_lowpart and gen_highpart.

From-SVN: r6378
1994-01-10 19:35:46 -05:00
Richard Kenner
e9baa64402 (protect_from_queue): If (MEM (QUEUED ...)), modify a new MEM instead
of the one we were passed.

From-SVN: r6375
1994-01-10 19:23:47 -05:00
Richard Kenner
993102850b (exand_expr, case RTL_EXPR): Call new function preserve_rtl_expr_result.
From-SVN: r6368
1994-01-10 19:06:36 -05:00
Richard Kenner
bf500664d7 (do_tablejump): Call emit_cmp_insn with likely-constant as second
operand.

From-SVN: r6329
1993-12-26 18:12:37 -05:00
Richard Kenner
3207b172f7 (expand_expr, case CONSTRUCTOR): If have a target, don't build
constructor into memory.

From-SVN: r6323
1993-12-25 17:51:12 -05:00
Richard Kenner
307b821c36 (expand_expr...
(expand_expr, case ARRAY_REF): Remove uses of *_type_node and simplify
folding a reference to a character in a STRING_CST.

From-SVN: r6322
1993-12-25 13:35:27 -05:00
Jim Wilson
2bf29316da (convert_modes): Can't truncate REG with gen_lowpart if
TRULY_NOOP_TRUNCATION doesn't allow it.

From-SVN: r6306
1993-12-24 12:20:44 -08:00
Richard Kenner
ea87523e22 (expand_expr, case MINUS_EXPR): When expanding an initializer, use
plus_constant as appropriate.

From-SVN: r6283
1993-12-23 17:14:26 -05:00
Jim Wilson
5b22bee861 (expand_expr, NEGATE_EXPR case): Use subtarget in
recursive call, not target.

From-SVN: r6271
1993-12-22 11:35:27 -08:00
Richard Kenner
1f9becfcbe (expand_builtin): Allow __builtin_next_arg to be used in varargs
functions.

From-SVN: r6237
1993-12-15 18:14:13 -05:00
Richard Kenner
c3a02afeae (move_block_{to,from}_reg): Check HAVE_{load,store}_multiple value;
don't just #idef the symbol.

From-SVN: r6192
1993-12-06 20:55:51 -05:00
Richard Kenner
f59d43a947 (expand_expr, case PLACEHOLDER_EXPR): Remove top entry from
PLACEHOLDER_LIST when expanding the value in it.

From-SVN: r6187
1993-12-06 07:32:35 -05:00
Richard Kenner
ca8142590f (expand_expr, case RTL_EXPR): Call free_temps_for_rtl_expr.
From-SVN: r6163
1993-11-25 18:12:37 -05:00
Richard Kenner
e287fd6e75 (expand_expr, case ADDR_EXPR): Also pass const0_rtx if necessary, to avoid multiple cleanup runs.
(expand_expr, case ADDR_EXPR): Also pass const0_rtx if necessary, to
avoid multiple cleanup runs.
(expand_expr, case WITH_CLEANUP_EXPR): Pass const0_rtx if necessary,
to keep the recursive call from running the same cleanups twice.
(expand_expr, case TARGET_EXPR): Don't try to add the cleanup if
ignore's non-zero, since we would have already done it.

From-SVN: r6155
1993-11-24 07:02:20 -05:00
Richard Kenner
adc22a04eb (expand_expr...
(expand_expr, case SAVE_EXPR): Properly recompute the value of
UNSIGNEDP when SAVE_EXPR_RTL is nonzero and we have promoted.

From-SVN: r6143
1993-11-23 15:26:10 -05:00
Richard Stallman
7b073ca6c5 (expand_builtin): For sin, cos, fsqrt, alloca, ffs, strlen,
strcpy, memcpy, strcmp, memcmp, if args are bad, use expand_call.

From-SVN: r6122
1993-11-20 09:21:06 +00:00