Commit b3520980 by Jakub Jelinek Committed by Jakub Jelinek

expr.h (store_bit_field, [...]): Remove last argument.

	* expr.h (store_bit_field, extract_bit_field): Remove last argument.
	* expmed.c (store_bit_field, extract_bit_field): Remove last
	argument.
	* builtins.c (expand_builtin_signbit): Adjust callers.
	* optabs.c (expand_vector_binop, expand_vector_unop): Likewise.
	* calls.c (store_unaligned_arguments_into_pseudos): Likewise.
	* ifcvt.c (noce_emit_move_insn): Likewise.
	* stmt.c (expand_return): Likewise.
	* expr.c (emit_group_load, emit_group_store, copy_blkmode_from_reg,
	store_field, expand_expr_real_1): Likewise.

From-SVN: r84447
parent 76aa5713
2004-07-10 Jakub Jelinek <jakub@redhat.com>
* expr.h (store_bit_field, extract_bit_field): Remove last argument.
* expmed.c (store_bit_field, extract_bit_field): Remove last
argument.
* builtins.c (expand_builtin_signbit): Adjust callers.
* optabs.c (expand_vector_binop, expand_vector_unop): Likewise.
* calls.c (store_unaligned_arguments_into_pseudos): Likewise.
* ifcvt.c (noce_emit_move_insn): Likewise.
* stmt.c (expand_return): Likewise.
* expr.c (emit_group_load, emit_group_store, copy_blkmode_from_reg,
store_field, expand_expr_real_1): Likewise.
2004-07-10 Richard Henderson <rth@redhat.com> 2004-07-10 Richard Henderson <rth@redhat.com>
* builtins.c (std_gimplify_va_arg_expr): Fix borked BIT_AND_EXPR. * builtins.c (std_gimplify_va_arg_expr): Fix borked BIT_AND_EXPR.
......
...@@ -5591,8 +5591,7 @@ expand_builtin_signbit (tree exp, rtx target) ...@@ -5591,8 +5591,7 @@ expand_builtin_signbit (tree exp, rtx target)
bitpos = GET_MODE_BITSIZE (imode) - 1 - bitpos; bitpos = GET_MODE_BITSIZE (imode) - 1 - bitpos;
temp = copy_to_mode_reg (imode, temp); temp = copy_to_mode_reg (imode, temp);
temp = extract_bit_field (temp, 1, bitpos, 1, temp = extract_bit_field (temp, 1, bitpos, 1,
NULL_RTX, rmode, rmode, NULL_RTX, rmode, rmode);
GET_MODE_SIZE (imode));
} }
else else
{ {
......
...@@ -851,7 +851,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals) ...@@ -851,7 +851,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals)
args[i].aligned_regs[j] = reg; args[i].aligned_regs[j] = reg;
word = extract_bit_field (word, bitsize, 0, 1, NULL_RTX, word = extract_bit_field (word, bitsize, 0, 1, NULL_RTX,
word_mode, word_mode, BITS_PER_WORD); word_mode, word_mode);
/* There is no need to restrict this code to loading items /* There is no need to restrict this code to loading items
in TYPE_ALIGN sized hunks. The bitfield instructions can in TYPE_ALIGN sized hunks. The bitfield instructions can
...@@ -868,7 +868,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals) ...@@ -868,7 +868,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals)
bytes -= bitsize / BITS_PER_UNIT; bytes -= bitsize / BITS_PER_UNIT;
store_bit_field (reg, bitsize, endian_correction, word_mode, store_bit_field (reg, bitsize, endian_correction, word_mode,
word, BITS_PER_WORD); word);
} }
} }
} }
......
...@@ -297,7 +297,7 @@ mode_for_extraction (enum extraction_pattern pattern, int opno) ...@@ -297,7 +297,7 @@ mode_for_extraction (enum extraction_pattern pattern, int opno)
rtx rtx
store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
unsigned HOST_WIDE_INT bitnum, enum machine_mode fieldmode, unsigned HOST_WIDE_INT bitnum, enum machine_mode fieldmode,
rtx value, HOST_WIDE_INT total_size) rtx value)
{ {
unsigned int unit unsigned int unit
= (MEM_P (str_rtx)) ? BITS_PER_UNIT : BITS_PER_WORD; = (MEM_P (str_rtx)) ? BITS_PER_UNIT : BITS_PER_WORD;
...@@ -308,12 +308,6 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, ...@@ -308,12 +308,6 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
enum machine_mode op_mode = mode_for_extraction (EP_insv, 3); enum machine_mode op_mode = mode_for_extraction (EP_insv, 3);
/* Discount the part of the structure before the desired byte.
We need to know how many bytes are safe to reference after it. */
if (total_size >= 0)
total_size -= (bitpos / BIGGEST_ALIGNMENT
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
while (GET_CODE (op0) == SUBREG) while (GET_CODE (op0) == SUBREG)
{ {
/* The following line once was done only if WORDS_BIG_ENDIAN, /* The following line once was done only if WORDS_BIG_ENDIAN,
...@@ -542,8 +536,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, ...@@ -542,8 +536,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
store_bit_field (op0, MIN (BITS_PER_WORD, store_bit_field (op0, MIN (BITS_PER_WORD,
bitsize - i * BITS_PER_WORD), bitsize - i * BITS_PER_WORD),
bitnum + bit_offset, word_mode, bitnum + bit_offset, word_mode,
operand_subword_force (value, wordnum, fieldmode), operand_subword_force (value, wordnum, fieldmode));
total_size);
} }
return value; return value;
} }
...@@ -650,8 +643,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, ...@@ -650,8 +643,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
/* Fetch that unit, store the bitfield in it, then store /* Fetch that unit, store the bitfield in it, then store
the unit. */ the unit. */
tempreg = copy_to_reg (op0); tempreg = copy_to_reg (op0);
store_bit_field (tempreg, bitsize, bitpos, fieldmode, value, store_bit_field (tempreg, bitsize, bitpos, fieldmode, value);
total_size);
emit_move_insn (op0, tempreg); emit_move_insn (op0, tempreg);
return value; return value;
} }
...@@ -1051,8 +1043,7 @@ store_split_bit_field (rtx op0, unsigned HOST_WIDE_INT bitsize, ...@@ -1051,8 +1043,7 @@ store_split_bit_field (rtx op0, unsigned HOST_WIDE_INT bitsize,
rtx rtx
extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
unsigned HOST_WIDE_INT bitnum, int unsignedp, rtx target, unsigned HOST_WIDE_INT bitnum, int unsignedp, rtx target,
enum machine_mode mode, enum machine_mode tmode, enum machine_mode mode, enum machine_mode tmode)
HOST_WIDE_INT total_size)
{ {
unsigned int unit unsigned int unit
= (MEM_P (str_rtx)) ? BITS_PER_UNIT : BITS_PER_WORD; = (MEM_P (str_rtx)) ? BITS_PER_UNIT : BITS_PER_WORD;
...@@ -1067,12 +1058,6 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, ...@@ -1067,12 +1058,6 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
enum machine_mode mode1; enum machine_mode mode1;
int byte_offset; int byte_offset;
/* Discount the part of the structure before the desired byte.
We need to know how many bytes are safe to reference after it. */
if (total_size >= 0)
total_size -= (bitpos / BIGGEST_ALIGNMENT
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
if (tmode == VOIDmode) if (tmode == VOIDmode)
tmode = mode; tmode = mode;
...@@ -1286,7 +1271,7 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, ...@@ -1286,7 +1271,7 @@ extract_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
= extract_bit_field (op0, MIN (BITS_PER_WORD, = extract_bit_field (op0, MIN (BITS_PER_WORD,
bitsize - i * BITS_PER_WORD), bitsize - i * BITS_PER_WORD),
bitnum + bit_offset, 1, target_part, mode, bitnum + bit_offset, 1, target_part, mode,
word_mode, total_size); word_mode);
if (target_part == 0) if (target_part == 0)
abort (); abort ();
......
...@@ -1886,7 +1886,7 @@ emit_group_load (rtx dst, rtx orig_src, tree type ATTRIBUTE_UNUSED, int ssize) ...@@ -1886,7 +1886,7 @@ emit_group_load (rtx dst, rtx orig_src, tree type ATTRIBUTE_UNUSED, int ssize)
&& (!REG_P (tmps[i]) || GET_MODE (tmps[i]) != mode)) && (!REG_P (tmps[i]) || GET_MODE (tmps[i]) != mode))
tmps[i] = extract_bit_field (tmps[i], bytelen * BITS_PER_UNIT, tmps[i] = extract_bit_field (tmps[i], bytelen * BITS_PER_UNIT,
(bytepos % slen0) * BITS_PER_UNIT, (bytepos % slen0) * BITS_PER_UNIT,
1, NULL_RTX, mode, mode, ssize); 1, NULL_RTX, mode, mode);
} }
else if (bytepos == 0) else if (bytepos == 0)
{ {
...@@ -1919,7 +1919,7 @@ emit_group_load (rtx dst, rtx orig_src, tree type ATTRIBUTE_UNUSED, int ssize) ...@@ -1919,7 +1919,7 @@ emit_group_load (rtx dst, rtx orig_src, tree type ATTRIBUTE_UNUSED, int ssize)
else else
tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT, tmps[i] = extract_bit_field (src, bytelen * BITS_PER_UNIT,
bytepos * BITS_PER_UNIT, 1, NULL_RTX, bytepos * BITS_PER_UNIT, 1, NULL_RTX,
mode, mode, ssize); mode, mode);
if (shift) if (shift)
tmps[i] = expand_shift (LSHIFT_EXPR, mode, tmps[i], tmps[i] = expand_shift (LSHIFT_EXPR, mode, tmps[i],
...@@ -2073,7 +2073,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) ...@@ -2073,7 +2073,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
emit_move_insn (adjust_address (dest, mode, bytepos), tmps[i]); emit_move_insn (adjust_address (dest, mode, bytepos), tmps[i]);
else else
store_bit_field (dest, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT, store_bit_field (dest, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT,
mode, tmps[i], ssize); mode, tmps[i]);
} }
emit_queue (); emit_queue ();
...@@ -2159,9 +2159,7 @@ copy_blkmode_from_reg (rtx tgtblk, rtx srcreg, tree type) ...@@ -2159,9 +2159,7 @@ copy_blkmode_from_reg (rtx tgtblk, rtx srcreg, tree type)
store_bit_field (dst, bitsize, bitpos % BITS_PER_WORD, word_mode, store_bit_field (dst, bitsize, bitpos % BITS_PER_WORD, word_mode,
extract_bit_field (src, bitsize, extract_bit_field (src, bitsize,
xbitpos % BITS_PER_WORD, 1, xbitpos % BITS_PER_WORD, 1,
NULL_RTX, word_mode, word_mode, NULL_RTX, word_mode, word_mode));
BITS_PER_WORD),
BITS_PER_WORD);
} }
return tgtblk; return tgtblk;
...@@ -5445,8 +5443,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos, ...@@ -5445,8 +5443,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
} }
/* Store the value in the bitfield. */ /* Store the value in the bitfield. */
store_bit_field (target, bitsize, bitpos, mode, temp, store_bit_field (target, bitsize, bitpos, mode, temp);
int_size_in_bytes (type));
if (value_mode != VOIDmode) if (value_mode != VOIDmode)
{ {
...@@ -5473,8 +5470,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos, ...@@ -5473,8 +5470,7 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
} }
return extract_bit_field (target, bitsize, bitpos, unsignedp, return extract_bit_field (target, bitsize, bitpos, unsignedp,
NULL_RTX, value_mode, VOIDmode, NULL_RTX, value_mode, VOIDmode);
int_size_in_bytes (type));
} }
return const0_rtx; return const0_rtx;
} }
...@@ -7303,8 +7299,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -7303,8 +7299,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
op0 = extract_bit_field (op0, bitsize, bitpos, unsignedp, op0 = extract_bit_field (op0, bitsize, bitpos, unsignedp,
(modifier == EXPAND_STACK_PARM (modifier == EXPAND_STACK_PARM
? NULL_RTX : target), ? NULL_RTX : target),
ext_mode, ext_mode, ext_mode, ext_mode);
int_size_in_bytes (TREE_TYPE (tem)));
/* If the result is a record type and BITSIZE is narrower than /* If the result is a record type and BITSIZE is narrower than
the mode of OP0, an integral mode, and this is a big endian the mode of OP0, an integral mode, and this is a big endian
......
...@@ -791,12 +791,10 @@ extern enum machine_mode ...@@ -791,12 +791,10 @@ extern enum machine_mode
mode_for_extraction (enum extraction_pattern, int); mode_for_extraction (enum extraction_pattern, int);
extern rtx store_bit_field (rtx, unsigned HOST_WIDE_INT, extern rtx store_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, enum machine_mode, rtx, unsigned HOST_WIDE_INT, enum machine_mode, rtx);
HOST_WIDE_INT);
extern rtx extract_bit_field (rtx, unsigned HOST_WIDE_INT, extern rtx extract_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int, rtx, unsigned HOST_WIDE_INT, int, rtx,
enum machine_mode, enum machine_mode, enum machine_mode, enum machine_mode);
HOST_WIDE_INT);
extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int); extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int);
extern bool const_mult_add_overflow_p (rtx, rtx, rtx, enum machine_mode, int); extern bool const_mult_add_overflow_p (rtx, rtx, rtx, enum machine_mode, int);
extern rtx expand_mult_add (rtx, rtx, rtx, rtx,enum machine_mode, int); extern rtx expand_mult_add (rtx, rtx, rtx, rtx,enum machine_mode, int);
......
...@@ -701,8 +701,7 @@ noce_emit_move_insn (rtx x, rtx y) ...@@ -701,8 +701,7 @@ noce_emit_move_insn (rtx x, rtx y)
outmode = GET_MODE (outer); outmode = GET_MODE (outer);
inmode = GET_MODE (inner); inmode = GET_MODE (inner);
bitpos = SUBREG_BYTE (outer) * BITS_PER_UNIT; bitpos = SUBREG_BYTE (outer) * BITS_PER_UNIT;
store_bit_field (inner, GET_MODE_BITSIZE (outmode), bitpos, outmode, y, store_bit_field (inner, GET_MODE_BITSIZE (outmode), bitpos, outmode, y);
GET_MODE_BITSIZE (inmode));
} }
/* Return sequence of instructions generated by if conversion. This /* Return sequence of instructions generated by if conversion. This
......
...@@ -1956,12 +1956,12 @@ expand_vector_binop (enum machine_mode mode, optab binoptab, rtx op0, ...@@ -1956,12 +1956,12 @@ expand_vector_binop (enum machine_mode mode, optab binoptab, rtx op0,
a = simplify_gen_subreg (submode, op0, mode, i * subsize); a = simplify_gen_subreg (submode, op0, mode, i * subsize);
else else
a = extract_bit_field (op0, subbitsize, i * subbitsize, unsignedp, a = extract_bit_field (op0, subbitsize, i * subbitsize, unsignedp,
NULL_RTX, submode, submode, size); NULL_RTX, submode, submode);
if (CONSTANT_P (op1)) if (CONSTANT_P (op1))
b = simplify_gen_subreg (submode, op1, mode, i * subsize); b = simplify_gen_subreg (submode, op1, mode, i * subsize);
else else
b = extract_bit_field (op1, subbitsize, i * subbitsize, unsignedp, b = extract_bit_field (op1, subbitsize, i * subbitsize, unsignedp,
NULL_RTX, submode, submode, size); NULL_RTX, submode, submode);
if (binoptab->code == DIV) if (binoptab->code == DIV)
{ {
...@@ -1982,8 +1982,7 @@ expand_vector_binop (enum machine_mode mode, optab binoptab, rtx op0, ...@@ -1982,8 +1982,7 @@ expand_vector_binop (enum machine_mode mode, optab binoptab, rtx op0,
if (t) if (t)
emit_move_insn (t, res); emit_move_insn (t, res);
else else
store_bit_field (target, subbitsize, i * subbitsize, submode, res, store_bit_field (target, subbitsize, i * subbitsize, submode, res);
size);
} }
break; break;
...@@ -2075,15 +2074,14 @@ expand_vector_unop (enum machine_mode mode, optab unoptab, rtx op0, ...@@ -2075,15 +2074,14 @@ expand_vector_unop (enum machine_mode mode, optab unoptab, rtx op0,
a = simplify_gen_subreg (submode, op0, mode, i * subsize); a = simplify_gen_subreg (submode, op0, mode, i * subsize);
else else
a = extract_bit_field (op0, subbitsize, i * subbitsize, unsignedp, a = extract_bit_field (op0, subbitsize, i * subbitsize, unsignedp,
t, submode, submode, size); t, submode, submode);
res = expand_unop (submode, unoptab, a, t, unsignedp); res = expand_unop (submode, unoptab, a, t, unsignedp);
if (t) if (t)
emit_move_insn (t, res); emit_move_insn (t, res);
else else
store_bit_field (target, subbitsize, i * subbitsize, submode, res, store_bit_field (target, subbitsize, i * subbitsize, submode, res);
size);
} }
seq = get_insns (); seq = get_insns ();
......
...@@ -2115,9 +2115,7 @@ expand_return (tree retval) ...@@ -2115,9 +2115,7 @@ expand_return (tree retval)
store_bit_field (dst, bitsize, xbitpos % BITS_PER_WORD, word_mode, store_bit_field (dst, bitsize, xbitpos % BITS_PER_WORD, word_mode,
extract_bit_field (src, bitsize, extract_bit_field (src, bitsize,
bitpos % BITS_PER_WORD, 1, bitpos % BITS_PER_WORD, 1,
NULL_RTX, word_mode, word_mode, NULL_RTX, word_mode, word_mode));
BITS_PER_WORD),
BITS_PER_WORD);
} }
tmpmode = GET_MODE (result_rtl); tmpmode = GET_MODE (result_rtl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment