diff options
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 441 |
1 files changed, 217 insertions, 224 deletions
@@ -242,7 +242,7 @@ enqueue_insn (var, body) rtx var, body; { pending_chain = gen_rtx (QUEUED, GET_MODE (var), - var, 0, 0, body, pending_chain); + var, NULL_RTX, NULL_RTX, body, pending_chain); return pending_chain; } @@ -601,7 +601,8 @@ convert_move (to, from, unsignedp) && insn_operand_mode[(int) CODE_FOR_slt][0] == word_mode && STORE_FLAG_VALUE == -1) { - emit_cmp_insn (lowfrom, const0_rtx, NE, 0, lowpart_mode, 0, 0); + emit_cmp_insn (lowfrom, const0_rtx, NE, NULL_RTX, + lowpart_mode, 0, 0); fill_value = gen_reg_rtx (word_mode); emit_insn (gen_slt (fill_value)); } @@ -611,7 +612,7 @@ convert_move (to, from, unsignedp) fill_value = expand_shift (RSHIFT_EXPR, lowpart_mode, lowfrom, size_int (GET_MODE_BITSIZE (lowpart_mode) - 1), - 0, 0); + NULL_RTX, 0); fill_value = convert_to_mode (word_mode, fill_value, 1); } } @@ -632,7 +633,7 @@ convert_move (to, from, unsignedp) insns = get_insns (); end_sequence (); - emit_no_conflict_block (insns, to, from, 0, + emit_no_conflict_block (insns, to, from, NULL_RTX, gen_rtx (equiv_code, to_mode, from)); return; } @@ -844,15 +845,15 @@ convert_to_mode (mode, x, unsignedp) return x; /* There is one case that we must handle specially: If we are converting - a CONST_INT into a mode whose size is twice HOST_BITS_PER_INT and + a CONST_INT into a mode whose size is twice HOST_BITS_PER_WIDE_INT and we are to interpret the constant as unsigned, gen_lowpart will do the wrong if the constant appears negative. What we want to do is make the high-order word of the constant zero, not all ones. */ if (unsignedp && GET_MODE_CLASS (mode) == MODE_INT - && GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_INT + && GET_MODE_BITSIZE (mode) == 2 * HOST_BITS_PER_WIDE_INT && GET_CODE (x) == CONST_INT && INTVAL (x) < 0) - return immed_double_const (INTVAL (x), 0, mode); + return immed_double_const (INTVAL (x), (HOST_WIDE_INT) 0, mode); /* We can do this with a gen_lowpart if both desired and current modes are integer, and this is either a constant integer, a register, or a @@ -1074,21 +1075,17 @@ move_by_pieces_1 (genfun, mode, data) #ifdef HAVE_PRE_DECREMENT if (data->explicit_inc_to < 0) - emit_insn (gen_add2_insn (data->to_addr, - gen_rtx (CONST_INT, VOIDmode, -size))); + emit_insn (gen_add2_insn (data->to_addr, GEN_INT (-size))); if (data->explicit_inc_from < 0) - emit_insn (gen_add2_insn (data->from_addr, - gen_rtx (CONST_INT, VOIDmode, -size))); + emit_insn (gen_add2_insn (data->from_addr, GEN_INT (-size))); #endif emit_insn ((*genfun) (to1, from1)); #ifdef HAVE_POST_INCREMENT if (data->explicit_inc_to > 0) - emit_insn (gen_add2_insn (data->to_addr, - gen_rtx (CONST_INT, VOIDmode, size))); + emit_insn (gen_add2_insn (data->to_addr, GEN_INT (size))); if (data->explicit_inc_from > 0) - emit_insn (gen_add2_insn (data->from_addr, - gen_rtx (CONST_INT, VOIDmode, size))); + emit_insn (gen_add2_insn (data->from_addr, GEN_INT (size))); #endif if (! data->reverse) data->offset += size; @@ -1130,8 +1127,7 @@ emit_block_move (x, y, size, align) abort (); if (GET_CODE (size) == CONST_INT - && (move_by_pieces_ninsns ((unsigned) INTVAL (size), align) - < MOVE_RATIO)) + && (move_by_pieces_ninsns (INTVAL (size), align) < MOVE_RATIO)) move_by_pieces (x, y, INTVAL (size), align); else { @@ -1144,8 +1140,7 @@ emit_block_move (x, y, size, align) && ((unsigned) INTVAL (size) < (1 << (GET_MODE_BITSIZE (QImode) - 1)))) { - rtx insn = gen_movstrqi (x, y, size, - gen_rtx (CONST_INT, VOIDmode, align)); + rtx insn = gen_movstrqi (x, y, size, GEN_INT (align)); if (insn) { emit_insn (insn); @@ -1159,8 +1154,7 @@ emit_block_move (x, y, size, align) && ((unsigned) INTVAL (size) < (1 << (GET_MODE_BITSIZE (HImode) - 1)))) { - rtx insn = gen_movstrhi (x, y, size, - gen_rtx (CONST_INT, VOIDmode, align)); + rtx insn = gen_movstrhi (x, y, size, GEN_INT (align)); if (insn) { emit_insn (insn); @@ -1171,8 +1165,7 @@ emit_block_move (x, y, size, align) #ifdef HAVE_movstrsi if (HAVE_movstrsi) { - rtx insn = gen_movstrsi (x, y, size, - gen_rtx (CONST_INT, VOIDmode, align)); + rtx insn = gen_movstrsi (x, y, size, GEN_INT (align)); if (insn) { emit_insn (insn); @@ -1183,8 +1176,7 @@ emit_block_move (x, y, size, align) #ifdef HAVE_movstrdi if (HAVE_movstrdi) { - rtx insn = gen_movstrdi (x, y, size, - gen_rtx (CONST_INT, VOIDmode, align)); + rtx insn = gen_movstrdi (x, y, size, GEN_INT (align)); if (insn) { emit_insn (insn); @@ -1227,7 +1219,7 @@ move_block_to_reg (regno, x, nregs, mode) #ifdef HAVE_load_multiple last = get_last_insn (); pat = gen_load_multiple (gen_rtx (REG, word_mode, regno), x, - gen_rtx (CONST_INT, VOIDmode, nregs)); + GEN_INT (nregs)); if (pat) { emit_insn (pat); @@ -1258,7 +1250,7 @@ move_block_from_reg (regno, x, nregs) #ifdef HAVE_store_multiple last = get_last_insn (); pat = gen_store_multiple (x, gen_rtx (REG, word_mode, regno), - gen_rtx (CONST_INT, VOIDmode, nregs)); + GEN_INT (nregs)); if (pat) { emit_insn (pat); @@ -1306,12 +1298,12 @@ clear_storage (object, size) emit_library_call (memset_libfunc, 1, VOIDmode, 3, XEXP (object, 0), Pmode, const0_rtx, Pmode, - gen_rtx (CONST_INT, VOIDmode, size), Pmode); + GEN_INT (size), Pmode); #else emit_library_call (bzero_libfunc, 1, VOIDmode, 2, XEXP (object, 0), Pmode, - gen_rtx (CONST_INT, VOIDmode, size), Pmode); + GEN_INT (size), Pmode); #endif } else @@ -1424,9 +1416,7 @@ push_block (size, extra, below) { rtx temp = copy_to_mode_reg (Pmode, size); if (extra != 0) - temp = expand_binop (Pmode, add_optab, - temp, - gen_rtx (CONST_INT, VOIDmode, extra), + temp = expand_binop (Pmode, add_optab, temp, GEN_INT (extra), temp, 0, OPTAB_LIB_WIDEN); anti_adjust_stack (temp); } @@ -1568,7 +1558,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, But if space already allocated, this has already been done. */ if (extra && args_addr == 0 && where_pad != none && where_pad != stack_direction) - anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra)); + anti_adjust_stack (GEN_INT (extra)); move_by_pieces (gen_rtx (MEM, BLKmode, gen_push_operand ()), xinner, INTVAL (size) - used, align); @@ -1583,11 +1573,11 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, if (partial != 0) { if (GET_CODE (size) == CONST_INT) - size = gen_rtx (CONST_INT, VOIDmode, INTVAL (size) - used); + size = GEN_INT (INTVAL (size) - used); else size = expand_binop (GET_MODE (size), sub_optab, size, - gen_rtx (CONST_INT, VOIDmode, used), - 0, 0, OPTAB_LIB_WIDEN); + GEN_INT (used), NULL_RTX, 0, + OPTAB_LIB_WIDEN); } /* Get the address of the stack space. @@ -1627,8 +1617,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, < (1 << (GET_MODE_BITSIZE (QImode) - 1)))) { emit_insn (gen_movstrqi (gen_rtx (MEM, BLKmode, temp), - xinner, size, - gen_rtx (CONST_INT, VOIDmode, align))); + xinner, size, GEN_INT (align))); goto ret; } #endif @@ -1639,8 +1628,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, < (1 << (GET_MODE_BITSIZE (HImode) - 1)))) { emit_insn (gen_movstrhi (gen_rtx (MEM, BLKmode, temp), - xinner, size, - gen_rtx (CONST_INT, VOIDmode, align))); + xinner, size, GEN_INT (align))); goto ret; } #endif @@ -1648,8 +1636,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, if (HAVE_movstrsi) { emit_insn (gen_movstrsi (gen_rtx (MEM, BLKmode, temp), - xinner, size, - gen_rtx (CONST_INT, VOIDmode, align))); + xinner, size, GEN_INT (align))); goto ret; } #endif @@ -1657,8 +1644,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, if (HAVE_movstrdi) { emit_insn (gen_movstrdi (gen_rtx (MEM, BLKmode, temp), - xinner, size, - gen_rtx (CONST_INT, VOIDmode, align))); + xinner, size, GEN_INT (align))); goto ret; } #endif @@ -1706,7 +1692,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, But if space already allocated, this has already been done. */ if (extra && args_addr == 0 && where_pad != none && where_pad != stack_direction) - anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra)); + anti_adjust_stack (GEN_INT (extra)); /* If we make space by pushing it, we might as well push the real data. Otherwise, we can leave OFFSET nonzero @@ -1747,9 +1733,9 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, #endif if (i >= not_stack + offset) emit_push_insn (operand_subword_force (x, i, mode), - word_mode, 0, 0, align, 0, 0, 0, args_addr, - gen_rtx (CONST_INT, VOIDmode, - args_offset + ((i - not_stack + skip) + word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX, + 0, args_addr, + GEN_INT (args_offset + ((i - not_stack + skip) * UNITS_PER_WORD))); } else @@ -1761,7 +1747,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, But if space already allocated, this has already been done. */ if (extra && args_addr == 0 && where_pad != none && where_pad != stack_direction) - anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra)); + anti_adjust_stack (GEN_INT (extra)); #ifdef PUSH_ROUNDING if (args_addr == 0) @@ -1787,7 +1773,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra, move_block_to_reg (REGNO (reg), x, partial, mode); if (extra && args_addr == 0 && where_pad == stack_direction) - anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra)); + anti_adjust_stack (GEN_INT (extra)); } /* Output a library call to function FUN (a SYMBOL_REF rtx) @@ -1864,29 +1850,29 @@ emit_library_call (va_alist) /* Make sure it is a reasonable operand for a move or push insn. */ if (GET_CODE (val) != REG && GET_CODE (val) != MEM && ! (CONSTANT_P (val) && LEGITIMATE_CONSTANT_P (val))) - val = force_operand (val, 0); + val = force_operand (val, NULL_RTX); argvec[count].value = val; argvec[count].mode = mode; #ifdef FUNCTION_ARG_PASS_BY_REFERENCE - if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, mode, (tree)0, 1)) + if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, mode, NULL_TREE, 1)) abort (); #endif - argvec[count].reg = FUNCTION_ARG (args_so_far, mode, (tree)0, 1); + argvec[count].reg = FUNCTION_ARG (args_so_far, mode, NULL_TREE, 1); if (argvec[count].reg && GET_CODE (argvec[count].reg) == EXPR_LIST) abort (); #ifdef FUNCTION_ARG_PARTIAL_NREGS argvec[count].partial - = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, (tree)0, 1); + = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, mode, NULL_TREE, 1); #else argvec[count].partial = 0; #endif - locate_and_pad_parm (mode, 0, + locate_and_pad_parm (mode, NULL_TREE, argvec[count].reg && argvec[count].partial == 0, - 0, &args_size, &argvec[count].offset, + NULL_TREE, &args_size, &argvec[count].offset, &argvec[count].size); if (argvec[count].size.var) @@ -1942,8 +1928,7 @@ emit_library_call (va_alist) #endif #ifndef PUSH_ROUNDING - argblock = push_block (gen_rtx (CONST_INT, VOIDmode, args_size.constant), - 0, 0); + argblock = push_block (GEN_INT (args_size.constant), 0, 0); #endif #ifdef PUSH_ARGS_REVERSED @@ -1964,9 +1949,8 @@ emit_library_call (va_alist) int partial = argvec[argnum].partial; if (! (reg != 0 && partial == 0)) - emit_push_insn (val, mode, 0, 0, 0, partial, reg, 0, argblock, - gen_rtx (CONST_INT, VOIDmode, - argvec[count].offset.constant)); + emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0, + argblock, GEN_INT (argvec[count].offset.constant)); NO_DEFER_POP; } @@ -2003,7 +1987,7 @@ emit_library_call (va_alist) use_insns = get_insns (); end_sequence (); - fun = prepare_call_address (fun, 0, &use_insns); + fun = prepare_call_address (fun, NULL_TREE, &use_insns); /* Don't allow popping to be deferred, since then cse'ing of library calls could delete a call and leave the pop. */ @@ -2014,7 +1998,7 @@ emit_library_call (va_alist) emit_call_1 (fun, get_identifier (XSTR (orgfun, 0)), args_size.constant, 0, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), - outmode != VOIDmode ? hard_libcall_value (outmode) : 0, + outmode != VOIDmode ? hard_libcall_value (outmode) : NULL_RTX, old_inhibit_defer_pop + 1, use_insns, no_queue); /* Now restore inhibit_defer_pop to its actual original value. */ @@ -2045,7 +2029,7 @@ expand_assignment (to, from, want_value, suggest_reg) /* Don't crash if the lhs of the assignment was erroneous. */ if (TREE_CODE (to) == ERROR_MARK) - return expand_expr (from, 0, VOIDmode, 0); + return expand_expr (from, NULL_RTX, VOIDmode, 0); /* Assignment of a structure component needs special treatment if the structure component's rtx is not simply a MEM. @@ -2073,10 +2057,10 @@ expand_assignment (to, from, want_value, suggest_reg) if (mode1 == VOIDmode && want_value) tem = stabilize_reference (tem); - to_rtx = expand_expr (tem, 0, VOIDmode, 0); + to_rtx = expand_expr (tem, NULL_RTX, VOIDmode, 0); if (offset != 0) { - rtx offset_rtx = expand_expr (offset, 0, VOIDmode, 0); + rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0); if (GET_CODE (to_rtx) != MEM) abort (); @@ -2115,7 +2099,7 @@ expand_assignment (to, from, want_value, suggest_reg) Don't re-expand if it was expanded already (in COMPONENT_REF case). */ if (to_rtx == 0) - to_rtx = expand_expr (to, 0, VOIDmode, 0); + to_rtx = expand_expr (to, NULL_RTX, VOIDmode, 0); /* In case we are returning the contents of an object which overlaps the place the value is being stored, use a safe function when copying @@ -2124,7 +2108,7 @@ expand_assignment (to, from, want_value, suggest_reg) && current_function_returns_struct && !current_function_returns_pcc_struct) { - rtx from_rtx = expand_expr (from, 0, VOIDmode, 0); + rtx from_rtx = expand_expr (from, NULL_RTX, VOIDmode, 0); rtx size = expr_size (from); #ifdef TARGET_MEM_FUNCTIONS @@ -2211,7 +2195,7 @@ store_expr (exp, target, suggest_reg) if EXP is another assignment, SUGGEST_REG will be nonzero for it. We know expand_expr will not use the target in that case. */ { - temp = expand_expr (exp, cse_not_expected ? 0 : target, + temp = expand_expr (exp, cse_not_expected ? NULL_RTX : target, GET_MODE (target), 0); if (GET_MODE (temp) != BLKmode && GET_MODE (temp) != VOIDmode) temp = copy_to_reg (temp); @@ -2231,7 +2215,7 @@ store_expr (exp, target, suggest_reg) temp = expand_expr (exp, temp, GET_MODE (target), 0); } else - temp = expand_expr (exp, 0, GET_MODE (target), 0); + temp = expand_expr (exp, NULL_RTX, GET_MODE (target), 0); dont_return_target = 1; } else @@ -2291,7 +2275,8 @@ store_expr (exp, target, suggest_reg) size_int (BITS_PER_UNIT)), convert (sizetype, build_int_2 (TREE_STRING_LENGTH (exp), 0)))); - rtx copy_size_rtx = expand_expr (copy_size, 0, VOIDmode, 0); + rtx copy_size_rtx = expand_expr (copy_size, NULL_RTX, + VOIDmode, 0); rtx label = 0; /* Copy that much. */ @@ -2313,12 +2298,14 @@ store_expr (exp, target, suggest_reg) temp = force_reg (Pmode, XEXP (target, 0)); temp = expand_binop (size_mode, add_optab, temp, - copy_size_rtx, 0, 0, OPTAB_LIB_WIDEN); + copy_size_rtx, NULL_RTX, 0, + OPTAB_LIB_WIDEN); size = expand_binop (size_mode, sub_optab, size, - copy_size_rtx, 0, 0, OPTAB_LIB_WIDEN); + copy_size_rtx, NULL_RTX, 0, + OPTAB_LIB_WIDEN); - emit_cmp_insn (size, const0_rtx, LT, 0, + emit_cmp_insn (size, const0_rtx, LT, NULL_RTX, GET_MODE (size), 0, 0); label = gen_label_rtx (); emit_jump_insn (gen_blt (label)); @@ -2438,8 +2425,8 @@ store_constructor (exp, target) register tree elt; register int i; tree domain = TYPE_DOMAIN (type); - int minelt = TREE_INT_CST_LOW (TYPE_MIN_VALUE (domain)); - int maxelt = TREE_INT_CST_LOW (TYPE_MAX_VALUE (domain)); + HOST_WIDE_INT minelt = TREE_INT_CST_LOW (TYPE_MIN_VALUE (domain)); + HOST_WIDE_INT maxelt = TREE_INT_CST_LOW (TYPE_MAX_VALUE (domain)); tree elttype = TREE_TYPE (type); /* If the constructor has fewer fields than the structure, @@ -2511,10 +2498,10 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, int align; int total_size; { - int width_mask = 0; + HOST_WIDE_INT width_mask = 0; - if (bitsize < HOST_BITS_PER_INT) - width_mask = (1 << bitsize) - 1; + if (bitsize < HOST_BITS_PER_WIDE_INT) + width_mask = ((HOST_WIDE_INT) 1 << bitsize) - 1; /* If we are storing into an unaligned field of an aligned union that is in a register, we may have the mode of TARGET being an integer mode but @@ -2556,7 +2543,7 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, || GET_CODE (target) == REG || GET_CODE (target) == SUBREG) { - rtx temp = expand_expr (exp, 0, VOIDmode, 0); + rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); /* Store the value in the bitfield. */ store_bit_field (target, bitsize, bitpos, mode, temp, align, total_size); if (value_mode != VOIDmode) @@ -2565,10 +2552,10 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, /* If possible, avoid refetching from the bitfield itself. */ if (width_mask != 0 && ! (GET_CODE (target) == MEM && MEM_VOLATILE_P (target))) - return expand_and (temp, - gen_rtx (CONST_INT, VOIDmode, width_mask), 0); + return expand_and (temp, GEN_INT (width_mask), NULL_RTX); return extract_bit_field (target, bitsize, bitpos, unsignedp, - 0, value_mode, 0, align, total_size); + NULL_RTX, value_mode, 0, align, + total_size); } return const0_rtx; } @@ -2785,7 +2772,7 @@ force_operand (value, target) subtarget = 0; tmp = force_operand (XEXP (value, 0), subtarget); return expand_mult (GET_MODE (value), tmp, - force_operand (op2, 0), + force_operand (op2, NULL_RTX), target, 0); } @@ -2823,7 +2810,7 @@ force_operand (value, target) tmp = force_operand (XEXP (value, 0), subtarget); return expand_binop (GET_MODE (value), binoptab, tmp, - force_operand (op2, 0), + force_operand (op2, NULL_RTX), target, 0, OPTAB_LIB_WIDEN); /* We give UNSIGNEP = 0 to expand_binop because the only operations we are expanding here are signed ones. */ @@ -2851,13 +2838,14 @@ save_noncopied_parts (lhs, list) { tree part = TREE_VALUE (tail); tree part_type = TREE_TYPE (part); - tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part, 0); + tree to_be_saved = build (COMPONENT_REF, part_type, lhs, part); rtx target = assign_stack_temp (TYPE_MODE (part_type), int_size_in_bytes (part_type), 0); if (! memory_address_p (TYPE_MODE (part_type), XEXP (target, 0))) - target = change_address (target, TYPE_MODE (part_type), 0); + target = change_address (target, TYPE_MODE (part_type), NULL_RTX); parts = tree_cons (to_be_saved, - build (RTL_EXPR, part_type, 0, (tree) target), + build (RTL_EXPR, part_type, NULL_TREE, + (tree) target), parts); store_expr (TREE_PURPOSE (parts), RTL_EXPR_RTL (TREE_VALUE (parts)), 0); } @@ -2883,7 +2871,7 @@ init_noncopied_parts (lhs, list) { tree part = TREE_VALUE (tail); tree part_type = TREE_TYPE (part); - tree to_be_initialized = build (COMPONENT_REF, part_type, lhs, part, 0); + tree to_be_initialized = build (COMPONENT_REF, part_type, lhs, part); parts = tree_cons (TREE_PURPOSE (tail), to_be_initialized, parts); } return parts; @@ -3304,8 +3292,8 @@ expand_expr (exp, target, tmode, modifier) /* Exit the current loop if the body-expression is true. */ { rtx label = gen_label_rtx (); - do_jump (TREE_OPERAND (exp, 0), label, 0); - expand_exit_loop (0); + do_jump (TREE_OPERAND (exp, 0), label, NULL_RTX); + expand_exit_loop (NULL_PTR); emit_label (label); } return const0_rtx; @@ -3416,14 +3404,15 @@ expand_expr (exp, target, tmode, modifier) && TYPE_MODE (TREE_TYPE (exp1)) == Pmode && TYPE_MODE (TREE_TYPE (exp2)) == Pmode) { - temp = expand_expr (TREE_OPERAND (exp1, 0), 0, VOIDmode, EXPAND_SUM); + temp = expand_expr (TREE_OPERAND (exp1, 0), NULL_RTX, + VOIDmode, EXPAND_SUM); op0 = memory_address (mode, temp); op0 = copy_all_regs (op0); SAVE_EXPR_RTL (exp1) = op0; } else { - op0 = expand_expr (exp1, 0, VOIDmode, EXPAND_SUM); + op0 = expand_expr (exp1, NULL_RTX, VOIDmode, EXPAND_SUM); op0 = memory_address (mode, op0); } @@ -3577,8 +3566,7 @@ expand_expr (exp, target, tmode, modifier) else if (TREE_CODE (init) == STRING_CST && i < TREE_STRING_LENGTH (init)) { - temp = gen_rtx (CONST_INT, VOIDmode, - TREE_STRING_POINTER (init)[i]); + temp = GEN_INT (TREE_STRING_POINTER (init)[i]); return convert_to_mode (mode, temp, 0); } } @@ -3612,7 +3600,7 @@ expand_expr (exp, target, tmode, modifier) /* In some cases, we will be offsetting OP0's address by a constant. So get it as a sum, if possible. If we will be using it directly in an insn, we validate it. */ - op0 = expand_expr (tem, 0, VOIDmode, EXPAND_SUM); + op0 = expand_expr (tem, NULL_RTX, VOIDmode, EXPAND_SUM); /* If this is a constant, put it into a register if it is a legimate constant and memory if it isn't. */ @@ -3627,7 +3615,7 @@ expand_expr (exp, target, tmode, modifier) if (offset != 0) { - rtx offset_rtx = expand_expr (offset, 0, VOIDmode, 0); + rtx offset_rtx = expand_expr (offset, NULL_RTX, VOIDmode, 0); if (GET_CODE (op0) != MEM) abort (); @@ -3701,7 +3689,7 @@ expand_expr (exp, target, tmode, modifier) { tree base = build_unary_op (ADDR_EXPR, TREE_OPERAND (exp, 0), 0); tree addr = build (PLUS_EXPR, type, base, TREE_OPERAND (exp, 1)); - op0 = expand_expr (addr, 0, VOIDmode, EXPAND_SUM); + op0 = expand_expr (addr, NULL_RTX, VOIDmode, EXPAND_SUM); temp = gen_rtx (MEM, mode, memory_address (mode, op0)); MEM_IN_STRUCT_P (temp) = 1; MEM_VOLATILE_P (temp) = TREE_THIS_VOLATILE (exp) || flag_volatile; @@ -3724,7 +3712,8 @@ expand_expr (exp, target, tmode, modifier) { RTL_EXPR_RTL (exp) = expand_expr (TREE_OPERAND (exp, 0), target, tmode, modifier); - cleanups_this_call = tree_cons (0, TREE_OPERAND (exp, 2), cleanups_this_call); + cleanups_this_call + = tree_cons (NULL_TREE, TREE_OPERAND (exp, 2), cleanups_this_call); /* That's it for this cleanup. */ TREE_OPERAND (exp, 2) = 0; } @@ -3774,7 +3763,8 @@ expand_expr (exp, target, tmode, modifier) if (GET_CODE (target) == MEM) /* Store data into beginning of memory target. */ store_expr (TREE_OPERAND (exp, 0), - change_address (target, TYPE_MODE (valtype), 0), 0); + change_address (target, TYPE_MODE (valtype), 0), + NULL_RTX); else if (GET_CODE (target) == REG) /* Store this field into a union of the proper type. */ store_field (target, GET_MODE_BITSIZE (TYPE_MODE (valtype)), 0, @@ -3787,7 +3777,7 @@ expand_expr (exp, target, tmode, modifier) /* Return the entire union. */ return target; } - op0 = expand_expr (TREE_OPERAND (exp, 0), 0, mode, 0); + op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, mode, 0); if (GET_MODE (op0) == mode || GET_MODE (op0) == VOIDmode) return op0; if (flag_force_mem && GET_CODE (op0) == MEM) @@ -3837,7 +3827,7 @@ expand_expr (exp, target, tmode, modifier) If this is an EXPAND_SUM call, always return the sum. */ if (TREE_CODE (TREE_OPERAND (exp, 0)) == INTEGER_CST - && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_INT + && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT && (modifier == EXPAND_SUM || modifier == EXPAND_INITIALIZER || mode == Pmode)) { @@ -3874,7 +3864,7 @@ expand_expr (exp, target, tmode, modifier) subtarget = 0; op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, modifier); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, modifier); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, modifier); /* Make sure any term that's a sum with a constant comes last. */ if (GET_CODE (op0) == PLUS @@ -3929,8 +3919,10 @@ expand_expr (exp, target, tmode, modifier) && really_constant_p (TREE_OPERAND (exp, 0)) && really_constant_p (TREE_OPERAND (exp, 1))) { - rtx op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, modifier); - rtx op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, modifier); + rtx op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, + VOIDmode, modifier); + rtx op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, + VOIDmode, modifier); return gen_rtx (MINUS, mode, op0, op1); } /* Convert A - const to A + (-const). */ @@ -3961,7 +3953,7 @@ expand_expr (exp, target, tmode, modifier) if (modifier == EXPAND_SUM && mode == Pmode && TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST - && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_INT) + && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) { op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, EXPAND_SUM); @@ -3970,20 +3962,17 @@ expand_expr (exp, target, tmode, modifier) && GET_CODE (XEXP (op0, 1)) == CONST_INT) return gen_rtx (PLUS, mode, gen_rtx (MULT, mode, XEXP (op0, 0), - gen_rtx (CONST_INT, VOIDmode, - TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))), - gen_rtx (CONST_INT, VOIDmode, - (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)) - * INTVAL (XEXP (op0, 1))))); + GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))), + GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)) + * INTVAL (XEXP (op0, 1)))); if (GET_CODE (op0) != REG) - op0 = force_operand (op0, 0); + op0 = force_operand (op0, NULL_RTX); if (GET_CODE (op0) != REG) op0 = copy_to_mode_reg (mode, op0); return gen_rtx (MULT, mode, op0, - gen_rtx (CONST_INT, VOIDmode, - TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))); + GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))); } if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1))) @@ -4002,7 +3991,7 @@ expand_expr (exp, target, tmode, modifier) TREE_TYPE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))) /* Don't use a widening multiply if a shift will do. */ && ((GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 1)))) - > HOST_BITS_PER_INT) + > HOST_BITS_PER_WIDE_INT) || exact_log2 (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))) < 0)) || (TREE_CODE (TREE_OPERAND (exp, 1)) == NOP_EXPR @@ -4023,17 +4012,18 @@ expand_expr (exp, target, tmode, modifier) && this_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) { op0 = expand_expr (TREE_OPERAND (TREE_OPERAND (exp, 0), 0), - 0, VOIDmode, 0); + NULL_RTX, VOIDmode, 0); if (TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST) - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, + VOIDmode, 0); else op1 = expand_expr (TREE_OPERAND (TREE_OPERAND (exp, 1), 0), - 0, VOIDmode, 0); + NULL_RTX, VOIDmode, 0); goto binop2; } } op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); return expand_mult (mode, op0, op1, target, unsignedp); case TRUNC_DIV_EXPR: @@ -4048,7 +4038,7 @@ expand_expr (exp, target, tmode, modifier) then if the divisor is constant can optimize the case where some terms of the dividend have coeffs divisible by it. */ op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); return expand_divmod (0, code, mode, op0, op1, target, unsignedp); case RDIV_EXPR: @@ -4063,7 +4053,7 @@ expand_expr (exp, target, tmode, modifier) if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1))) subtarget = 0; op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); return expand_divmod (1, code, mode, op0, op1, target, unsignedp); case FIX_ROUND_EXPR: @@ -4072,14 +4062,14 @@ expand_expr (exp, target, tmode, modifier) abort (); /* Not used for C. */ case FIX_TRUNC_EXPR: - op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0); + op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); if (target == 0) target = gen_reg_rtx (mode); expand_fix (target, op0, unsignedp); return target; case FLOAT_EXPR: - op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0); + op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); if (target == 0) target = gen_reg_rtx (mode); /* expand_float can't figure out what to do if FROM has VOIDmode. @@ -4119,7 +4109,7 @@ expand_expr (exp, target, tmode, modifier) { rtx extended = expand_shift (RSHIFT_EXPR, mode, op0, size_int (GET_MODE_BITSIZE (mode) - 1), - 0, 0); + NULL_RTX, 0); temp = expand_binop (mode, xor_optab, extended, op0, target, 0, OPTAB_LIB_WIDEN); @@ -4141,8 +4131,8 @@ expand_expr (exp, target, tmode, modifier) emit_move_insn (target, op0); emit_cmp_insn (target, expand_expr (convert (type, integer_zero_node), - 0, VOIDmode, 0), - GE, 0, mode, 0, 0); + NULL_RTX, VOIDmode, 0), + GE, NULL_RTX, mode, 0, 0); NO_DEFER_POP; emit_jump_insn (gen_bge (temp)); op0 = expand_unop (mode, neg_optab, target, target, 0); @@ -4159,7 +4149,7 @@ expand_expr (exp, target, tmode, modifier) || (GET_CODE (target) == REG && REGNO (target) < FIRST_PSEUDO_REGISTER)) target = gen_reg_rtx (mode); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, 0); /* First try to do it with a special MIN or MAX instruction. @@ -4179,12 +4169,12 @@ expand_expr (exp, target, tmode, modifier) op0 = gen_label_rtx (); if (code == MAX_EXPR) temp = (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1))) - ? compare_from_rtx (target, op1, GEU, 1, mode, 0, 0) - : compare_from_rtx (target, op1, GE, 0, mode, 0, 0)); + ? compare_from_rtx (target, op1, GEU, 1, mode, NULL_RTX, 0) + : compare_from_rtx (target, op1, GE, 0, mode, NULL_RTX, 0)); else temp = (TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 1))) - ? compare_from_rtx (target, op1, LEU, 1, mode, 0, 0) - : compare_from_rtx (target, op1, LE, 0, mode, 0, 0)); + ? compare_from_rtx (target, op1, LEU, 1, mode, NULL_RTX, 0) + : compare_from_rtx (target, op1, LE, 0, mode, NULL_RTX, 0)); if (temp == const0_rtx) emit_move_insn (target, op1); else if (temp != const_true_rtx) @@ -4278,7 +4268,7 @@ expand_expr (exp, target, tmode, modifier) if (temp != original_target) temp = copy_to_reg (temp); op1 = gen_label_rtx (); - emit_cmp_insn (temp, const0_rtx, EQ, 0, + emit_cmp_insn (temp, const0_rtx, EQ, NULL_RTX, GET_MODE (temp), unsignedp, 0); emit_jump_insn (gen_beq (op1)); emit_move_insn (temp, const1_rtx); @@ -4308,8 +4298,7 @@ expand_expr (exp, target, tmode, modifier) op0 = expand_expr (TREE_OPERAND (exp, 0), target, VOIDmode, 0); /* The parser is careful to generate TRUTH_NOT_EXPR only with operands that are always zero or one. */ - temp = expand_binop (mode, xor_optab, op0, - gen_rtx (CONST_INT, mode, 1), + temp = expand_binop (mode, xor_optab, op0, const1_rtx, target, 1, OPTAB_LIB_WIDEN); if (temp == 0) abort (); @@ -4430,12 +4419,13 @@ expand_expr (exp, target, tmode, modifier) = invert_truthvalue (TREE_OPERAND (exp, 0)); result = do_store_flag (TREE_OPERAND (exp, 0), - safe_from_p (temp, singleton) ? temp : 0, + (safe_from_p (temp, singleton) + ? temp : NULL_RTX), mode, BRANCH_COST <= 1); if (result) { - op1 = expand_expr (singleton, 0, VOIDmode, 0); + op1 = expand_expr (singleton, NULL_RTX, VOIDmode, 0); return expand_binop (mode, boptab, op1, result, temp, unsignedp, OPTAB_LIB_WIDEN); } @@ -4463,7 +4453,8 @@ expand_expr (exp, target, tmode, modifier) store_expr (singleton, temp, 0); } else - expand_expr (singleton, ignore ? const1_rtx : 0, VOIDmode, 0); + expand_expr (singleton, + ignore ? const1_rtx : NULL_RTX, VOIDmode, 0); if (cleanups_this_call) { sorry ("aggregate value in COND_EXPR"); @@ -4477,7 +4468,7 @@ expand_expr (exp, target, tmode, modifier) if (binary_op && temp == 0) /* Just touch the other operand. */ expand_expr (TREE_OPERAND (binary_op, 1), - ignore ? const0_rtx : 0, VOIDmode, 0); + ignore ? const0_rtx : NULL_RTX, VOIDmode, 0); else if (binary_op) store_expr (build (TREE_CODE (binary_op), type, make_tree (type, temp), @@ -4560,8 +4551,8 @@ expand_expr (exp, target, tmode, modifier) if (temp != 0) store_expr (TREE_OPERAND (exp, 1), temp, 0); else - expand_expr (TREE_OPERAND (exp, 1), ignore ? const0_rtx : 0, - VOIDmode, 0); + expand_expr (TREE_OPERAND (exp, 1), + ignore ? const0_rtx : NULL_RTX, VOIDmode, 0); if (cleanups_this_call) { sorry ("aggregate value in COND_EXPR"); @@ -4575,8 +4566,8 @@ expand_expr (exp, target, tmode, modifier) if (temp != 0) store_expr (TREE_OPERAND (exp, 2), temp, 0); else - expand_expr (TREE_OPERAND (exp, 2), ignore ? const0_rtx : 0, - VOIDmode, 0); + expand_expr (TREE_OPERAND (exp, 2), + ignore ? const0_rtx : NULL_RTX, VOIDmode, 0); } if (cleanups_this_call) @@ -4631,8 +4622,8 @@ expand_expr (exp, target, tmode, modifier) if (TREE_OPERAND (exp, 2) == 0) TREE_OPERAND (exp, 2) = maybe_build_cleanup (slot); if (TREE_OPERAND (exp, 2)) - cleanups_this_call = tree_cons (0, TREE_OPERAND (exp, 2), - cleanups_this_call); + cleanups_this_call = tree_cons (NULL_TREE, TREE_OPERAND (exp, 2), + cleanups_this_call); #endif } else @@ -4755,7 +4746,7 @@ expand_expr (exp, target, tmode, modifier) } else { - op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, + op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, (modifier == EXPAND_INITIALIZER ? modifier : EXPAND_CONST_ADDRESS)); if (GET_CODE (op0) != MEM) @@ -4786,7 +4777,7 @@ expand_expr (exp, target, tmode, modifier) if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1))) subtarget = 0; op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); binop2: temp = expand_binop (mode, this_optab, op0, op1, target, unsignedp, OPTAB_LIB_WIDEN); @@ -5041,7 +5032,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) { /* By checking op > 0 we are able to catch all of the IEEE special cases with a single if conditional. */ - emit_cmp_insn (op0, CONST0_RTX (GET_MODE (op0)), GT, 0, + emit_cmp_insn (op0, CONST0_RTX (GET_MODE (op0)), GT, NULL_RTX, GET_MODE (op0), 0, 0); emit_jump_insn (gen_bgt (lab1)); @@ -5162,7 +5153,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) if (wordnum < 0 || wordnum >= nwords) error ("argument of __builtin_args_info out of range"); else - return gen_rtx (CONST_INT, VOIDmode, word_ptr[wordnum]); + return GEN_INT (word_ptr[wordnum]); } } else @@ -5181,7 +5172,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) TREE_STATIC (result) = 1; result = build (INDIRECT_REF, build_pointer_type (type), result); TREE_CONSTANT (result) = 1; - return expand_expr (result, 0, VOIDmode, 0); + return expand_expr (result, NULL_RTX, VOIDmode, 0); #endif } @@ -5201,7 +5192,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) return expand_binop (Pmode, add_optab, current_function_internal_arg_pointer, current_function_arg_offset_rtx, - 0, 0, OPTAB_LIB_WIDEN); + NULL_RTX, 0, OPTAB_LIB_WIDEN); case BUILT_IN_CLASSIFY_TYPE: if (arglist != 0) @@ -5209,45 +5200,45 @@ expand_builtin (exp, target, subtarget, mode, ignore) tree type = TREE_TYPE (TREE_VALUE (arglist)); enum tree_code code = TREE_CODE (type); if (code == VOID_TYPE) - return gen_rtx (CONST_INT, VOIDmode, void_type_class); + return GEN_INT (void_type_class); if (code == INTEGER_TYPE) - return gen_rtx (CONST_INT, VOIDmode, integer_type_class); + return GEN_INT (integer_type_class); if (code == CHAR_TYPE) - return gen_rtx (CONST_INT, VOIDmode, char_type_class); + return GEN_INT (char_type_class); if (code == ENUMERAL_TYPE) - return gen_rtx (CONST_INT, VOIDmode, enumeral_type_class); + return GEN_INT (enumeral_type_class); if (code == BOOLEAN_TYPE) - return gen_rtx (CONST_INT, VOIDmode, boolean_type_class); + return GEN_INT (boolean_type_class); if (code == POINTER_TYPE) - return gen_rtx (CONST_INT, VOIDmode, pointer_type_class); + return GEN_INT (pointer_type_class); if (code == REFERENCE_TYPE) - return gen_rtx (CONST_INT, VOIDmode, reference_type_class); + return GEN_INT (reference_type_class); if (code == OFFSET_TYPE) - return gen_rtx (CONST_INT, VOIDmode, offset_type_class); + return GEN_INT (offset_type_class); if (code == REAL_TYPE) - return gen_rtx (CONST_INT, VOIDmode, real_type_class); + return GEN_INT (real_type_class); if (code == COMPLEX_TYPE) - return gen_rtx (CONST_INT, VOIDmode, complex_type_class); + return GEN_INT (complex_type_class); if (code == FUNCTION_TYPE) - return gen_rtx (CONST_INT, VOIDmode, function_type_class); + return GEN_INT (function_type_class); if (code == METHOD_TYPE) - return gen_rtx (CONST_INT, VOIDmode, method_type_class); + return GEN_INT (method_type_class); if (code == RECORD_TYPE) - return gen_rtx (CONST_INT, VOIDmode, record_type_class); + return GEN_INT (record_type_class); if (code == UNION_TYPE) - return gen_rtx (CONST_INT, VOIDmode, union_type_class); + return GEN_INT (union_type_class); if (code == ARRAY_TYPE) - return gen_rtx (CONST_INT, VOIDmode, array_type_class); + return GEN_INT (array_type_class); if (code == STRING_TYPE) - return gen_rtx (CONST_INT, VOIDmode, string_type_class); + return GEN_INT (string_type_class); if (code == SET_TYPE) - return gen_rtx (CONST_INT, VOIDmode, set_type_class); + return GEN_INT (set_type_class); if (code == FILE_TYPE) - return gen_rtx (CONST_INT, VOIDmode, file_type_class); + return GEN_INT (file_type_class); if (code == LANG_TYPE) - return gen_rtx (CONST_INT, VOIDmode, lang_type_class); + return GEN_INT (lang_type_class); } - return gen_rtx (CONST_INT, VOIDmode, no_type_class); + return GEN_INT (no_type_class); case BUILT_IN_CONSTANT_P: if (arglist == 0) @@ -5317,14 +5308,14 @@ expand_builtin (exp, target, subtarget, mode, ignore) return const0_rtx; current_function_calls_alloca = 1; /* Compute the argument. */ - op0 = expand_expr (TREE_VALUE (arglist), 0, VOIDmode, 0); + op0 = expand_expr (TREE_VALUE (arglist), NULL_RTX, VOIDmode, 0); /* Allocate the desired space. */ target = allocate_dynamic_stack_space (op0, target, BITS_PER_UNIT); /* Record the new stack level for nonlocal gotos. */ if (nonlocal_goto_handler_slot != 0) - emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, 0); + emit_stack_save (SAVE_NONLOCAL, &nonlocal_goto_stack_level, NULL_RTX); return target; case BUILT_IN_FFS: @@ -5403,7 +5394,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) result = gen_reg_rtx (insn_mode); src_rtx = memory_address (BLKmode, - expand_expr (src, 0, Pmode, + expand_expr (src, NULL_RTX, Pmode, EXPAND_NORMAL)); if (! (*insn_operand_predicate[(int)icode][1]) (src_rtx, Pmode)) src_rtx = copy_to_mode_reg (Pmode, src_rtx); @@ -5415,8 +5406,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) emit_insn (GEN_FCN (icode) (result, gen_rtx (MEM, BLKmode, src_rtx), - char_rtx, - gen_rtx (CONST_INT, VOIDmode, align))); + char_rtx, GEN_INT (align))); /* Return the value in the proper mode for this function. */ if (GET_MODE (result) == value_mode) @@ -5450,7 +5440,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) len = size_binop (PLUS_EXPR, len, integer_one_node); - chainon (arglist, build_tree_list (0, len)); + chainon (arglist, build_tree_list (NULL_TREE, len)); } /* Drops in. */ @@ -5488,16 +5478,17 @@ expand_builtin (exp, target, subtarget, mode, ignore) break; } - dest_rtx = expand_expr (dest, 0, Pmode, EXPAND_NORMAL); + dest_rtx = expand_expr (dest, NULL_RTX, Pmode, EXPAND_NORMAL); /* Copy word part most expediently. */ emit_block_move (gen_rtx (MEM, BLKmode, memory_address (BLKmode, dest_rtx)), gen_rtx (MEM, BLKmode, memory_address (BLKmode, - expand_expr (src, 0, Pmode, + expand_expr (src, NULL_RTX, + Pmode, EXPAND_NORMAL))), - expand_expr (len, 0, VOIDmode, 0), + expand_expr (len, NULL_RTX, VOIDmode, 0), MIN (src_align, dest_align)); return dest_rtx; } @@ -5555,7 +5546,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) len = len2; } - chainon (arglist, build_tree_list (0, len)); + chainon (arglist, build_tree_list (NULL_TREE, len)); } /* Drops in. */ @@ -5604,12 +5595,13 @@ expand_builtin (exp, target, subtarget, mode, ignore) emit_insn (gen_cmpstrsi (result, gen_rtx (MEM, BLKmode, - expand_expr (arg1, 0, Pmode, EXPAND_NORMAL)), + expand_expr (arg1, NULL_RTX, Pmode, + EXPAND_NORMAL)), gen_rtx (MEM, BLKmode, - expand_expr (arg2, 0, Pmode, EXPAND_NORMAL)), - expand_expr (len, 0, VOIDmode, 0), - gen_rtx (CONST_INT, VOIDmode, - MIN (arg1_align, arg2_align)))); + expand_expr (arg2, NULL_RTX, Pmode, + EXPAND_NORMAL)), + expand_expr (len, NULL_RTX, VOIDmode, 0), + GEN_INT (MIN (arg1_align, arg2_align)))); /* Return the value in the proper mode for this function. */ mode = TYPE_MODE (TREE_TYPE (exp)); @@ -5670,10 +5662,10 @@ expand_increment (exp, post) I believe it is a copy iff it is a register or subreg and insns were generated in computing it. */ temp = get_last_insn (); - op0 = expand_expr (incremented, 0, VOIDmode, 0); + op0 = expand_expr (incremented, NULL_RTX, VOIDmode, 0); op0_is_copy = ((GET_CODE (op0) == SUBREG || GET_CODE (op0) == REG) && temp != get_last_insn ()); - op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); /* Decide whether incrementing or decrementing. */ if (TREE_CODE (exp) == POSTDECREMENT_EXPR @@ -5705,7 +5697,7 @@ expand_increment (exp, post) if (this_optab == sub_optab && GET_CODE (op1) == CONST_INT) { - op1 = gen_rtx (CONST_INT, VOIDmode, - INTVAL (op1)); + op1 = GEN_INT (- INTVAL (op1)); this_optab = add_optab; } @@ -5784,7 +5776,7 @@ preexpand_calls (exp) if (TREE_CODE (TREE_OPERAND (exp, 0)) != ADDR_EXPR || TREE_CODE (TREE_OPERAND (TREE_OPERAND (exp, 0), 0)) != FUNCTION_DECL || ! DECL_BUILT_IN (TREE_OPERAND (TREE_OPERAND (exp, 0), 0))) - CALL_EXPR_RTL (exp) = expand_call (exp, 0, 0); + CALL_EXPR_RTL (exp) = expand_call (exp, NULL_RTX, 0); return; case COMPOUND_EXPR: @@ -5851,7 +5843,7 @@ do_pending_stack_adjust () if (inhibit_defer_pop == 0) { if (pending_stack_adjust != 0) - adjust_stack (gen_rtx (CONST_INT, VOIDmode, pending_stack_adjust)); + adjust_stack (GEN_INT (pending_stack_adjust)); pending_stack_adjust = 0; } } @@ -5865,7 +5857,7 @@ expand_cleanups_to (old_cleanups) { while (cleanups_this_call != old_cleanups) { - expand_expr (TREE_VALUE (cleanups_this_call), 0, VOIDmode, 0); + expand_expr (TREE_VALUE (cleanups_this_call), NULL_RTX, VOIDmode, 0); cleanups_this_call = TREE_CHAIN (cleanups_this_call); } } @@ -5881,7 +5873,7 @@ jumpifnot (exp, label) tree exp; rtx label; { - do_jump (exp, label, 0); + do_jump (exp, label, NULL_RTX); } /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ @@ -5891,7 +5883,7 @@ jumpif (exp, label) tree exp; rtx label; { - do_jump (exp, 0, label); + do_jump (exp, NULL_RTX, label); } /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if @@ -5994,7 +5986,7 @@ do_jump (exp, if_false_label, if_true_label) if (! SLOW_BYTE_ACCESS && TREE_CODE (TREE_OPERAND (exp, 1)) == INTEGER_CST - && TYPE_PRECISION (TREE_TYPE (exp)) <= HOST_BITS_PER_INT + && TYPE_PRECISION (TREE_TYPE (exp)) <= HOST_BITS_PER_WIDE_INT && (i = floor_log2 (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1)))) >= 0 && (type = type_for_size (i + 1, 1)) != 0 && TYPE_PRECISION (type) < TYPE_PRECISION (TREE_TYPE (exp)) @@ -6013,14 +6005,14 @@ do_jump (exp, if_false_label, if_true_label) case TRUTH_ANDIF_EXPR: if (if_false_label == 0) if_false_label = drop_through_label = gen_label_rtx (); - do_jump (TREE_OPERAND (exp, 0), if_false_label, 0); + do_jump (TREE_OPERAND (exp, 0), if_false_label, NULL_RTX); do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); break; case TRUTH_ORIF_EXPR: if (if_true_label == 0) if_true_label = drop_through_label = gen_label_rtx (); - do_jump (TREE_OPERAND (exp, 0), 0, if_true_label); + do_jump (TREE_OPERAND (exp, 0), NULL_RTX, if_true_label); do_jump (TREE_OPERAND (exp, 1), if_false_label, if_true_label); break; @@ -6074,7 +6066,7 @@ do_jump (exp, if_false_label, if_true_label) { register rtx label1 = gen_label_rtx (); drop_through_label = gen_label_rtx (); - do_jump (TREE_OPERAND (exp, 0), label1, 0); + do_jump (TREE_OPERAND (exp, 0), label1, NULL_RTX); /* Now the THEN-expression. */ do_jump (TREE_OPERAND (exp, 1), if_false_label ? if_false_label : drop_through_label, @@ -6151,7 +6143,7 @@ do_jump (exp, if_false_label, if_true_label) default: normal: - temp = expand_expr (exp, 0, VOIDmode, 0); + temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); #if 0 /* This is not needed any more and causes poor code since it causes comparisons and tests from non-SI objects to have different code @@ -6172,7 +6164,7 @@ do_jump (exp, if_false_label, if_true_label) do_jump_by_parts_equality_rtx (temp, if_true_label, if_false_label); else if (GET_MODE (temp) != VOIDmode) comparison = compare_from_rtx (temp, CONST0_RTX (GET_MODE (temp)), - NE, 1, GET_MODE (temp), 0, 0); + NE, 1, GET_MODE (temp), NULL_RTX, 0); else abort (); } @@ -6220,8 +6212,8 @@ do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label) int swap; rtx if_false_label, if_true_label; { - rtx op0 = expand_expr (TREE_OPERAND (exp, swap), 0, VOIDmode, 0); - rtx op1 = expand_expr (TREE_OPERAND (exp, !swap), 0, VOIDmode, 0); + rtx op0 = expand_expr (TREE_OPERAND (exp, swap), NULL_RTX, VOIDmode, 0); + rtx op1 = expand_expr (TREE_OPERAND (exp, !swap), NULL_RTX, VOIDmode, 0); enum machine_mode mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD); rtx drop_through_label = 0; @@ -6255,19 +6247,19 @@ do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label) /* All but high-order word must be compared as unsigned. */ comp = compare_from_rtx (op0_word, op1_word, (unsignedp || i > 0) ? GTU : GT, - unsignedp, word_mode, 0, 0); + unsignedp, word_mode, NULL_RTX, 0); if (comp == const_true_rtx) emit_jump (if_true_label); else if (comp != const0_rtx) - do_jump_for_compare (comp, 0, if_true_label); + do_jump_for_compare (comp, NULL_RTX, if_true_label); /* Consider lower words only if these are equal. */ comp = compare_from_rtx (op0_word, op1_word, NE, unsignedp, word_mode, - 0, 0); + NULL_RTX, 0); if (comp == const_true_rtx) emit_jump (if_false_label); else if (comp != const0_rtx) - do_jump_for_compare (comp, 0, if_false_label); + do_jump_for_compare (comp, NULL_RTX, if_false_label); } if (if_false_label) @@ -6284,8 +6276,8 @@ do_jump_by_parts_equality (exp, if_false_label, if_true_label) tree exp; rtx if_false_label, if_true_label; { - rtx op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0); - rtx op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + rtx op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); + rtx op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); enum machine_mode mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0))); int nwords = (GET_MODE_SIZE (mode) / UNITS_PER_WORD); int i; @@ -6298,11 +6290,11 @@ do_jump_by_parts_equality (exp, if_false_label, if_true_label) { rtx comp = compare_from_rtx (operand_subword_force (op0, i, mode), operand_subword_force (op1, i, mode), - EQ, 0, word_mode, 0, 0); + EQ, 0, word_mode, NULL_RTX, 0); if (comp == const_true_rtx) emit_jump (if_false_label); else if (comp != const0_rtx) - do_jump_for_compare (comp, if_false_label, 0); + do_jump_for_compare (comp, if_false_label, NULL_RTX); } if (if_true_label) @@ -6331,11 +6323,11 @@ do_jump_by_parts_equality_rtx (op0, if_false_label, if_true_label) { rtx comp = compare_from_rtx (operand_subword_force (op0, i, GET_MODE (op0)), - const0_rtx, EQ, 0, word_mode, 0, 0); + const0_rtx, EQ, 0, word_mode, NULL_RTX, 0); if (comp == const_true_rtx) emit_jump (if_false_label); else if (comp != const0_rtx) - do_jump_for_compare (comp, if_false_label, 0); + do_jump_for_compare (comp, if_false_label, NULL_RTX); } if (if_true_label) @@ -6422,8 +6414,10 @@ compare (exp, signed_code, unsigned_code) register tree exp; enum rtx_code signed_code, unsigned_code; { - register rtx op0 = expand_expr (TREE_OPERAND (exp, 0), 0, VOIDmode, 0); - register rtx op1 = expand_expr (TREE_OPERAND (exp, 1), 0, VOIDmode, 0); + register rtx op0 + = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, VOIDmode, 0); + register rtx op1 + = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0); register tree type = TREE_TYPE (TREE_OPERAND (exp, 0)); register enum machine_mode mode = TYPE_MODE (type); int unsignedp = TREE_UNSIGNED (type); @@ -6431,7 +6425,7 @@ compare (exp, signed_code, unsigned_code) return compare_from_rtx (op0, op1, code, unsignedp, mode, ((mode == BLKmode) - ? expr_size (TREE_OPERAND (exp, 0)) : 0), + ? expr_size (TREE_OPERAND (exp, 0)) : NULL_RTX), TYPE_ALIGN (TREE_TYPE (exp)) / BITS_PER_UNIT); } @@ -6482,12 +6476,11 @@ compare_from_rtx (op0, op1, code, unsignedp, mode, size, align) sign-extension is. If we are comparing against a constant, we must convert it to what it would look like unsigned. */ if ((code == EQ || code == NE) && ! unsignedp - && GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_INT) + && GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_WIDE_INT) { if (GET_CODE (op1) == CONST_INT && (INTVAL (op1) & GET_MODE_MASK (GET_MODE (op0))) != INTVAL (op1)) - op1 = gen_rtx (CONST_INT, VOIDmode, - INTVAL (op1) & GET_MODE_MASK (GET_MODE (op0))); + op1 = GEN_INT (INTVAL (op1) & GET_MODE_MASK (GET_MODE (op0))); unsignedp = 1; } @@ -6618,10 +6611,10 @@ do_store_flag (exp, target, mode, only_cheap) if ((code == NE || code == EQ) && TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1) && integer_pow2p (TREE_OPERAND (arg0, 1)) - && TYPE_PRECISION (type) <= HOST_BITS_PER_INT) + && TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT) { int bitnum = exact_log2 (INTVAL (expand_expr (TREE_OPERAND (arg0, 1), - 0, VOIDmode, 0))); + NULL_RTX, VOIDmode, 0))); if (subtarget == 0 || GET_CODE (subtarget) != REG || GET_MODE (subtarget) != operand_mode @@ -6678,7 +6671,7 @@ do_store_flag (exp, target, mode, only_cheap) subtarget = 0; op0 = expand_expr (arg0, subtarget, VOIDmode, 0); - op1 = expand_expr (arg1, 0, VOIDmode, 0); + op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0); if (target == 0) target = gen_reg_rtx (mode); @@ -6700,7 +6693,8 @@ do_store_flag (exp, target, mode, only_cheap) target = gen_reg_rtx (GET_MODE (target)); emit_move_insn (target, invert ? const0_rtx : const1_rtx); - result = compare_from_rtx (op0, op1, code, unsignedp, operand_mode, 0, 0); + result = compare_from_rtx (op0, op1, code, unsignedp, + operand_mode, NULL_RTX, 0); if (GET_CODE (result) == CONST_INT) return (((result == const0_rtx && ! invert) || (result != const0_rtx && invert)) @@ -6745,7 +6739,7 @@ do_tablejump (index, mode, range, table_label, default_label) or equal to the minimum value of the range and less than or equal to the maximum value of the range. */ - emit_cmp_insn (range, index, LTU, 0, mode, 0, 0); + emit_cmp_insn (range, index, LTU, NULL_RTX, mode, 0, 0); emit_jump_insn (gen_bltu (default_label)); /* If index is in range, it must fit in Pmode. @@ -6765,8 +6759,7 @@ do_tablejump (index, mode, range, table_label, default_label) (CASE_VECTOR_MODE, gen_rtx (PLUS, Pmode, gen_rtx (MULT, Pmode, index, - gen_rtx (CONST_INT, VOIDmode, - GET_MODE_SIZE (CASE_VECTOR_MODE))), + GEN_INT (GET_MODE_SIZE (CASE_VECTOR_MODE))), gen_rtx (LABEL_REF, Pmode, table_label))); temp = gen_reg_rtx (CASE_VECTOR_MODE); vector = gen_rtx (MEM, CASE_VECTOR_MODE, index); |