Commit Graph

33 Commits

Author SHA1 Message Date
Richard Stallman
06c94bceeb (store_split_bit_field, extract_split_bit_field):
Handle fields split across more than 2 aligned units.

From-SVN: r4840
1993-07-05 03:30:59 +00:00
Richard Stallman
e49a094d25 (MAX_BITS_PER_WORD): Define earlier.
(shift_cost, shiftadd_cost, shiftsub_cost): Use MAX_BITS_PER_WORD.

From-SVN: r4657
1993-06-10 17:00:40 +00:00
Torbjorn Granlund
63610db99b (synth_mult): Move code to add or subtract at leftmost 1-bit to before...
(synth_mult): Move code to add or subtract at
leftmost 1-bit to before factoring code to decrease the allowed cost
quickly.  Restrict it to handle only odd numbers.
(init_expmed): Limit mult_cost to make synth_mult run faster.

From-SVN: r4636
1993-06-05 09:52:14 +00:00
Richard Stallman
172a1cb0ef (init_expmed): Supply missing arg to rtx_cost.
From-SVN: r4385
1993-05-08 19:32:22 +00:00
Richard Kenner
e54d80d014 (store_split_bit_field): Properly handle VALUE when it is a
CONST_DOUBLE.

From-SVN: r4354
1993-05-06 05:47:46 -04:00
Jim Wilson
401db79156 (extract_fixed_bit_field): Adjust BITPOS so that it
fits inside MODE before adjusting OFFSET to get an aligned address.

From-SVN: r4216
1993-04-25 14:07:22 -07:00
Richard Stallman
f2dd837227 (expand_divmod): When adjusting op0 for trunc_div or trunc_mod...
(expand_divmod): When adjusting op0 for trunc_div or
trunc_mod, using shifts (not branches), make a new pseudo for the
result.  Don't use target for adjusted_op0.

From-SVN: r4081
1993-04-11 08:08:54 +00:00
Torbjorn Granlund
dac57de003 (init_expmed): Fix typo in last change.
From-SVN: r3801
1993-03-20 16:22:37 +00:00
Richard Kenner
5eebe2eb03 (synth_mult): Don't try to make recursive call if we would be shifting by a negative number.
(synth_mult): Don't try to make recursive call if we would be shifting
by a negative number.
(expand_mult): Don't negate VAL if it is negative.

From-SVN: r3788
1993-03-19 17:30:21 -05:00
Richard Kenner
b385aeda3f (zero_cost): New variable.
(init_expmed): Always pass some insn to recog.
Set shift_cost[0], shiftadd_cost[0] and shiftsub_cost[0] to something
reasonable.
Compute zero_cost.
(enum alg_code): Remove alg_none; add alg_zero and alg_m.
(struct algorithm): Rename field COEFF to LOG.
(synth_mult): Use new ops alg_zero and alg_m for multiplication by zero and
one, respectively.
Use MIN when helpful.
Be consistent and don't test cost before recursive call.
Don't special-case shift counts of zero; already handled elsewhere.
(expand_mult): First operation is always alg_zero or alg_m; remaining
operations can't be one of those.
Use proper subtargets for computations.
Remove special-cases for shift counts of zero.
Track value computed so far and make REG_EQUAL notes.

From-SVN: r3786
1993-03-19 06:27:23 -05:00
Richard Kenner
b2fb324cbf (lea_max_mul): Delete.
(init_expmed): Delete unused variable I.
(enum alg_code): New tag alg_shift.  Document it.
(synth_mult): Delete unused variable N.  Handle new trivial case
first, for T <= 1.  Generalize shifting code to shift whenever a
number is even; use alg_shift for this.  Set best_alg->ops only in
trivial case.  Clean up cost calculation code for the `simple case' at
the end; use shiftadd_cost when appropriate.  Combine declarations of
Q and move to top of function.  Eliminate use of Q in factoring cases.
If we are getting too long a sequence for `struct algorithm' to
record, fail.
(expand_mult): Handle alg_shift instead of alg_add_t_m2 as first
operation.  In RLT emit loop, handle alg_shift; special case LOG == 0
for alg_add_t_m2 and alg_sub_t_m2.

From-SVN: r3750
1993-03-15 18:38:07 -05:00
Richard Kenner
7963ac373a (shift_cost): Now a vector.
(shiftadd_cost): New vector for cost of (N * a + b) instructions.
(shiftsub_cost): New vector for cost of (N * a - b) instructions.
(lea_cost): Removed.
(init_expmed): Initialize new vectors.  Use ASHIFT, not LSHIFT.
Remove code initializing lea_cost.
(enum alg_code): New definition.
(synth_mult): Rewrite for better algorithms and faster operation.
(expand_mult): Rewrite code for constant multiplication.

From-SVN: r3735
1993-03-14 21:26:55 -05:00
Richard Kenner
c8c1bde3bb (emit_store_flag): Fix typo in testing BRANCH_COST.
From-SVN: r3533
1993-02-25 17:52:02 -05:00
Richard Stallman
522ae84c3d (emit_store_flag): Add missing arg to convert_move.
From-SVN: r3437
1993-02-08 04:34:45 +00:00
Richard Kenner
c2615a67c7 (emit_store_flag): Swap operands if first is a constant and second is not.
Abort if compare_from_rtx didn't return an rtx with the code we expect.

From-SVN: r3371
1993-01-27 19:23:02 -05:00
Richard Stallman
8deb7047a6 (emit_store_flag): Reset ICODE using returned COMPARISON.
From-SVN: r3315
1993-01-24 00:03:35 +00:00
Richard Kenner
cbec710efc (expand_shift): If rotating by a constant, try both directions of rotate...
(expand_shift): If rotating by a constant, try both directions of
rotate; if can't open-code a rotate, do it as a pair of shifts
followed by an IOR.

From-SVN: r2971
1992-12-28 06:07:52 -05:00
Richard Stallman
f5df292efc (store_bit_field): If VALUE needs to be narrowed, do
it with gen_lowpart, not an explicit SUBREG.

From-SVN: r2920
1992-12-27 03:55:29 +00:00
Richard Stallman
3b2f07926a (struct algorithm): Make coeff a HOST_WIDE_INT.
From-SVN: r2806
1992-11-26 15:34:10 +00:00
Richard Kenner
2c414fba8e (expand_mult): Bound second synth_mult cost by cost of algorithm from
first call.

(expand_divmod): When doing logical operations, the size of
COMPUTE_MODE should be used, not MODE.

From-SVN: r1869
1992-08-17 07:34:23 -04:00
Tom Wood
3d32ffd13f (expand_divmod): Eliminate the generation of branches
when possible.

From-SVN: r1687
1992-07-25 10:14:05 +00:00
Richard Stallman
b3d4e1b2a1 (expand_shift, expand_set_flag):
Call protect_from_queue before convert_to_mode.

From-SVN: r1606
1992-07-17 04:24:33 +00:00
Charles Hannum
b1ec3c9262 entered into RCS
From-SVN: r1472
1992-07-06 20:04:10 +00:00
Richard Kenner
4b980e20ad *** empty log message ***
From-SVN: r1318
1992-06-28 06:10:54 -04:00
Richard Stallman
d8064a5d0a *** empty log message ***
From-SVN: r1101
1992-05-27 20:52:20 +00:00
Richard Kenner
c2a47e48d5 *** empty log message ***
From-SVN: r1045
1992-05-22 06:33:37 -04:00
Richard Stallman
66c1f88e8e *** empty log message ***
From-SVN: r1007
1992-05-18 05:34:36 +00:00
Richard Stallman
b7a091350e *** empty log message ***
From-SVN: r979
1992-05-14 21:37:58 +00:00
Richard Stallman
56a2f04910 *** empty log message ***
From-SVN: r787
1992-04-19 01:16:25 +00:00
Richard Stallman
aeedc93fba *** empty log message ***
From-SVN: r779
1992-04-18 19:40:49 +00:00
Richard Kenner
717702e6ae *** empty log message ***
From-SVN: r680
1992-04-04 04:43:06 -05:00
Richard Stallman
36d747f619 *** empty log message ***
From-SVN: r573
1992-03-23 02:16:03 +00:00
Torbjorn Granlund
44037a668c Initial revision
From-SVN: r401
1992-03-06 19:37:23 +00:00