diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-07-06 16:14:57 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-07-06 16:14:57 -0400 |
commit | 373666321abc0c92b292160fbb328a991d205940 (patch) | |
tree | 8979093ab82c6099e027310ce4a8ecddb266b9cf | |
parent | fb3821f7b217dc72d9792d4c4f62095273a5fac7 (diff) | |
download | gcc-373666321abc0c92b292160fbb328a991d205940.zip gcc-373666321abc0c92b292160fbb328a991d205940.tar.gz gcc-373666321abc0c92b292160fbb328a991d205940.tar.bz2 |
*** empty log message ***
From-SVN: r1475
-rw-r--r-- | gcc/regclass.c | 7 | ||||
-rw-r--r-- | gcc/sdbout.c | 4 | ||||
-rw-r--r-- | gcc/stmt.c | 189 | ||||
-rw-r--r-- | gcc/toplev.c | 77 | ||||
-rw-r--r-- | gcc/tree.c | 51 | ||||
-rw-r--r-- | gcc/varasm.c | 64 |
6 files changed, 213 insertions, 179 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index d11d249..58399dd 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -536,7 +536,7 @@ regclass (f, nregs) if (GET_CODE (insn) == INSN && (noperands = asm_noperands (PATTERN (insn))) >= 0) { - decode_asm_operands (PATTERN (insn), recog_operand, 0, + decode_asm_operands (PATTERN (insn), recog_operand, NULL_PTR, constraints, modes); nalternatives = n_occurrences (',', constraints[0]) + 1; } @@ -557,7 +557,8 @@ regclass (f, nregs) if (set != 0 && GET_CODE (SET_DEST (set)) == REG && GET_CODE (SET_SRC (set)) == MEM - && (note = find_reg_note (insn, REG_EQUIV, 0)) != 0 + && (note = find_reg_note (insn, REG_EQUIV, + NULL_RTX)) != 0 && GET_CODE (XEXP (note, 0)) == MEM) { costs[REGNO (SET_DEST (set))].mem_cost @@ -984,7 +985,7 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn) /* Match any floating double constant, but only if we can examine the bits of it reliably. */ if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT - || HOST_BITS_PER_INT != BITS_PER_WORD) + || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD) && GET_MODE (op) != VOIDmode && ! flag_pretend_float) break; if (GET_CODE (op) == CONST_DOUBLE) diff --git a/gcc/sdbout.c b/gcc/sdbout.c index b8e0a4e..8ebb5a8 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -1129,8 +1129,8 @@ sdbout_parms (parms) /* Perform any necessary register eliminations on the parameter's rtl, so that the debugging output will be accurate. */ DECL_INCOMING_RTL (parms) = - eliminate_regs (DECL_INCOMING_RTL (parms), 0, 0); - DECL_RTL (parms) = eliminate_regs (DECL_RTL (parms), 0, 0); + eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX); + DECL_RTL (parms) = eliminate_regs (DECL_RTL (parms), 0, NULL_RTX); if (PARM_PASSED_IN_MEMORY (parms)) { @@ -531,7 +531,7 @@ void expand_computed_goto (exp) tree exp; { - rtx x = expand_expr (exp, 0, VOIDmode, 0); + rtx x = expand_expr (exp, NULL_RTX, VOIDmode, 0); emit_queue (); emit_indirect_jump (x); } @@ -644,7 +644,7 @@ expand_goto (label) addr = replace_rtx (copy_rtx (addr), virtual_stack_vars_rtx, frame_pointer_rtx); - emit_stack_restore (SAVE_NONLOCAL, addr, 0); + emit_stack_restore (SAVE_NONLOCAL, addr, NULL_RTX); /* Put in the static chain register the nonlocal label address. */ emit_move_insn (static_chain_rtx, @@ -658,7 +658,7 @@ expand_goto (label) } } else - expand_goto_internal (label, label_rtx (label), 0); + expand_goto_internal (label, label_rtx (label), NULL_RTX); } /* Generate RTL code for a `goto' statement with target label BODY. @@ -696,7 +696,7 @@ expand_goto_internal (body, label, last_insn) /* Execute the cleanups for blocks we are exiting. */ if (block->data.block.cleanups != 0) { - expand_cleanups (block->data.block.cleanups, 0); + expand_cleanups (block->data.block.cleanups, NULL_TREE); do_pending_stack_adjust (); } } @@ -707,7 +707,7 @@ expand_goto_internal (body, label, last_insn) the stack pointer. This one should be deleted as dead by flow. */ clear_pending_stack_adjust (); do_pending_stack_adjust (); - emit_stack_restore (SAVE_BLOCK, stack_level, 0); + emit_stack_restore (SAVE_BLOCK, stack_level, NULL_RTX); } if (body != 0 && DECL_TOO_LATE (body)) @@ -824,7 +824,7 @@ expand_fixup (tree_label, rtl_label, last_insn) #endif ) || block->data.block.cleanups) - ? tree_cons (0, block->data.block.cleanups, + ? tree_cons (NULL_TREE, block->data.block.cleanups, block->data.block.outer_cleanups) : 0); fixup->next = goto_fixup_chain; @@ -1062,7 +1062,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) && TREE_CODE (val) != INDIRECT_REF) TREE_VALUE (tail) = save_expr (TREE_VALUE (tail)); - output_rtx[i] = expand_expr (TREE_VALUE (tail), 0, VOIDmode, 0); + output_rtx[i] = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); } if (ninputs + noutputs > MAX_RECOG_OPERANDS) @@ -1113,7 +1113,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) } XVECEXP (body, 3, i) /* argvec */ - = expand_expr (TREE_VALUE (tail), 0, VOIDmode, 0); + = expand_expr (TREE_VALUE (tail), NULL_RTX, VOIDmode, 0); XVECEXP (body, 4, i) /* constraints */ = gen_rtx (ASM_INPUT, TYPE_MODE (TREE_TYPE (TREE_VALUE (tail))), TREE_STRING_POINTER (TREE_PURPOSE (tail))); @@ -1227,7 +1227,9 @@ expand_expr_stmt (exp) } last_expr_type = TREE_TYPE (exp); if (! flag_syntax_only) - last_expr_value = expand_expr (exp, expr_stmts_for_value ? 0 : const0_rtx, + last_expr_value = expand_expr (exp, + (expr_stmts_for_value + ? NULL_RTX : const0_rtx), VOIDmode, 0); /* If all we do is reference a volatile value in memory, @@ -1244,7 +1246,7 @@ expand_expr_stmt (exp) /* Compare the value with itself to reference it. */ emit_cmp_insn (last_expr_value, last_expr_value, EQ, expand_expr (TYPE_SIZE (last_expr_type), - 0, VOIDmode, 0), + NULL_RTX, VOIDmode, 0), BLKmode, 0, TYPE_ALIGN (last_expr_type) / BITS_PER_UNIT); emit_jump_insn ((*bcc_gen_fctn[(int) EQ]) (lab)); @@ -1539,7 +1541,7 @@ expand_start_try (try_clause, exitflag, escapeflag) except_stack = thishandler; nesting_stack = thishandler; - do_jump (try_clause, thishandler->data.except_stmt.except_label, NULL); + do_jump (try_clause, thishandler->data.except_stmt.except_label, NULL_RTX); } /* End of a TRY block. Nothing to do for now. */ @@ -1548,7 +1550,8 @@ void expand_end_try () { except_stack->data.except_stmt.after_label = gen_label_rtx (); - expand_goto_internal (NULL, except_stack->data.except_stmt.after_label, 0); + expand_goto_internal (NULL_TREE, except_stack->data.except_stmt.after_label, + NULL_RTX); } /* Start an `except' nesting contour. @@ -1611,7 +1614,8 @@ expand_escape_except () for (n = except_stack; n; n = n->next) if (n->data.except_stmt.escape_label != 0) { - expand_goto_internal (0, n->data.except_stmt.escape_label, 0); + expand_goto_internal (NULL_TREE, + n->data.except_stmt.escape_label, NULL_RTX); return 1; } @@ -1714,7 +1718,8 @@ expand_end_catch () { if (except_stack == 0 || except_stack->data.except_stmt.after_label == 0) return 0; - expand_goto_internal (0, except_stack->data.except_stmt.after_label, 0); + expand_goto_internal (NULL_TREE, except_stack->data.except_stmt.after_label, + NULL_RTX); return 1; } @@ -1745,7 +1750,7 @@ expand_start_cond (cond, exitflag) cond_stack = thiscond; nesting_stack = thiscond; - do_jump (cond, thiscond->data.cond.next_label, NULL); + do_jump (cond, thiscond->data.cond.next_label, NULL_RTX); } /* Generate RTL between then-clause and the elseif-clause @@ -1760,7 +1765,7 @@ expand_start_elseif (cond) emit_jump (cond_stack->data.cond.endif_label); emit_label (cond_stack->data.cond.next_label); cond_stack->data.cond.next_label = gen_label_rtx (); - do_jump (cond, cond_stack->data.cond.next_label, NULL); + do_jump (cond, cond_stack->data.cond.next_label, NULL_RTX); } /* Generate RTL between the then-clause and the else-clause @@ -1821,7 +1826,7 @@ expand_start_loop (exit_flag) do_pending_stack_adjust (); emit_queue (); - emit_note (0, NOTE_INSN_LOOP_BEG); + emit_note (NULL_PTR, NOTE_INSN_LOOP_BEG); emit_label (thisloop->data.loop.start_label); return thisloop; @@ -1848,7 +1853,7 @@ void expand_loop_continue_here () { do_pending_stack_adjust (); - emit_note (0, NOTE_INSN_LOOP_CONT); + emit_note (NULL_PTR, NOTE_INSN_LOOP_CONT); emit_label (loop_stack->data.loop.continue_label); } @@ -1952,7 +1957,7 @@ expand_end_loop () } emit_jump (start_label); - emit_note (0, NOTE_INSN_LOOP_END); + emit_note (NULL_PTR, NOTE_INSN_LOOP_END); emit_label (loop_stack->data.loop.end_label); POPSTACK (loop_stack); @@ -1974,7 +1979,8 @@ expand_continue_loop (whichloop) whichloop = loop_stack; if (whichloop == 0) return 0; - expand_goto_internal (0, whichloop->data.loop.continue_label, 0); + expand_goto_internal (NULL_TREE, whichloop->data.loop.continue_label, + NULL_RTX); return 1; } @@ -1990,7 +1996,7 @@ expand_exit_loop (whichloop) whichloop = loop_stack; if (whichloop == 0) return 0; - expand_goto_internal (0, whichloop->data.loop.end_label, 0); + expand_goto_internal (NULL_TREE, whichloop->data.loop.end_label, NULL_RTX); return 1; } @@ -2008,7 +2014,7 @@ expand_exit_loop_if_false (whichloop, cond) whichloop = loop_stack; if (whichloop == 0) return 0; - do_jump (cond, whichloop->data.loop.end_label, NULL); + do_jump (cond, whichloop->data.loop.end_label, NULL_RTX); return 1; } @@ -2055,7 +2061,7 @@ expand_exit_something () for (n = nesting_stack; n; n = n->all) if (n->exit_label != 0) { - expand_goto_internal (0, n->exit_label, 0); + expand_goto_internal (NULL_TREE, n->exit_label, NULL_RTX); return 1; } @@ -2133,7 +2139,7 @@ expand_null_return_1 (last_insn, use_goto) { if (end_label == 0) end_label = return_label = gen_label_rtx (); - expand_goto_internal (0, end_label, last_insn); + expand_goto_internal (NULL_TREE, end_label, last_insn); return; } @@ -2149,7 +2155,7 @@ expand_null_return_1 (last_insn, use_goto) #endif /* Otherwise jump to the epilogue. */ - expand_goto_internal (0, end_label, last_insn); + expand_goto_internal (NULL_TREE, end_label, last_insn); } /* Generate RTL to evaluate the expression RETVAL and return it @@ -2177,7 +2183,7 @@ expand_return (retval) /* If function wants no value, give it none. */ if (TREE_CODE (TREE_TYPE (TREE_TYPE (current_function_decl))) == VOID_TYPE) { - expand_expr (retval, 0, VOIDmode, 0); + expand_expr (retval, NULL_RTX, VOIDmode, 0); expand_null_return (); return; } @@ -2213,7 +2219,7 @@ expand_return (retval) || TREE_CODE (TREE_OPERAND (retval_rhs, 2)) == CALL_EXPR)) { rtx label = gen_label_rtx (); - do_jump (TREE_OPERAND (retval_rhs, 0), label, 0); + do_jump (TREE_OPERAND (retval_rhs, 0), label, NULL_RTX); expand_return (build (MODIFY_EXPR, TREE_TYPE (current_function_decl), DECL_RESULT (current_function_decl), TREE_OPERAND (retval_rhs, 1))); @@ -2246,7 +2252,7 @@ expand_return (retval) tail_recursion_reentry); } emit_queue (); - expand_goto_internal (0, tail_recursion_label, last_insn); + expand_goto_internal (NULL_TREE, tail_recursion_label, last_insn); emit_barrier (); return; } @@ -2292,7 +2298,7 @@ expand_return (retval) && GET_CODE (DECL_RTL (DECL_RESULT (current_function_decl))) == REG) { /* Calculate the return value into a pseudo reg. */ - val = expand_expr (retval_rhs, 0, VOIDmode, 0); + val = expand_expr (retval_rhs, NULL_RTX, VOIDmode, 0); emit_queue (); /* All temporaries have now been used. */ free_temp_slots (); @@ -2303,7 +2309,7 @@ expand_return (retval) { /* No cleanups or no hard reg used; calculate value into hard return reg. */ - expand_expr (retval, 0, VOIDmode, 0); + expand_expr (retval, NULL_RTX, VOIDmode, 0); emit_queue (); free_temp_slots (); expand_value_return (DECL_RTL (DECL_RESULT (current_function_decl))); @@ -2358,7 +2364,7 @@ tail_recursion_args (actuals, formals) argvec = (rtx *) alloca (i * sizeof (rtx)); for (a = actuals, i = 0; a; a = TREE_CHAIN (a), i++) - argvec[i] = expand_expr (TREE_VALUE (a), 0, VOIDmode, 0); + argvec[i] = expand_expr (TREE_VALUE (a), NULL_RTX, VOIDmode, 0); /* Find which actual values refer to current values of previous formals. Copy each of them now, before any formal is changed. */ @@ -2402,7 +2408,7 @@ expand_start_bindings (exit_flag) { struct nesting *thisblock = ALLOC_NESTING (); - rtx note = emit_note (0, NOTE_INSN_BLOCK_BEG); + rtx note = emit_note (NULL_PTR, NOTE_INSN_BLOCK_BEG); /* Make an entry on block_stack for the block we are entering. */ @@ -2475,7 +2481,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) /* Mark the beginning and end of the scope if requested. */ if (mark_ends) - emit_note (0, NOTE_INSN_BLOCK_END); + emit_note (NULL_PTR, NOTE_INSN_BLOCK_END); else /* Get rid of the beginning-mark if we don't make an end-mark. */ NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED; @@ -2633,7 +2639,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) expr_stmts_for_value = 0; /* Do the cleanups. */ - expand_cleanups (thisblock->data.block.cleanups, 0); + expand_cleanups (thisblock->data.block.cleanups, NULL_TREE); do_pending_stack_adjust (); expr_stmts_for_value = old_expr_stmts_for_value; @@ -2645,9 +2651,10 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) if (thisblock->data.block.stack_level != 0) { emit_stack_restore (thisblock->next ? SAVE_BLOCK : SAVE_FUNCTION, - thisblock->data.block.stack_level, 0); + thisblock->data.block.stack_level, NULL_RTX); 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); } /* Any gotos out of this block must also do these things. @@ -2816,17 +2823,18 @@ expand_decl (decl) size = expand_expr (size_binop (CEIL_DIV_EXPR, DECL_SIZE (decl), size_int (BITS_PER_UNIT)), - 0, VOIDmode, 0); + NULL_RTX, VOIDmode, 0); free_temp_slots (); /* This is equivalent to calling alloca. */ current_function_calls_alloca = 1; /* Allocate space on the stack for the variable. */ - address = allocate_dynamic_stack_space (size, 0, DECL_ALIGN (decl)); + address = allocate_dynamic_stack_space (size, NULL_RTX, + DECL_ALIGN (decl)); 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); /* Reference the variable indirect through that rtx. */ DECL_RTL (decl) = gen_rtx (MEM, DECL_MODE (decl), address); @@ -3030,7 +3038,7 @@ fixup_cleanups (list, before_jump) rtx beyond_jump = get_last_insn (); rtx new_before_jump; - expand_cleanups (list, 0); + expand_cleanups (list, NULL_TREE); /* Pop any pushes done in the cleanups, in case function is about to return. */ do_pending_stack_adjust (); @@ -3144,7 +3152,7 @@ expand_start_case (exit_flag, expr, type, printname) /* Make sure case_stmt.start points to something that won't need any transformation before expand_end_case. */ if (GET_CODE (get_last_insn ()) != NOTE) - emit_note (0, NOTE_INSN_DELETED); + emit_note (NULL_PTR, NOTE_INSN_DELETED); thiscase->data.case_stmt.start = get_last_insn (); } @@ -3661,7 +3669,8 @@ expand_end_case (orig_index) else if (TREE_INT_CST_HIGH (range) != 0 || count < CASE_VALUES_THRESHOLD - || (unsigned) (TREE_INT_CST_LOW (range)) > 10 * count + || ((unsigned HOST_WIDE_INT) (TREE_INT_CST_LOW (range)) + > 10 * count) || TREE_CODE (index_expr) == INTEGER_CST /* These will reduce to a constant. */ || (TREE_CODE (index_expr) == CALL_EXPR @@ -3671,7 +3680,7 @@ expand_end_case (orig_index) || (TREE_CODE (index_expr) == COMPOUND_EXPR && TREE_CODE (TREE_OPERAND (index_expr, 1)) == INTEGER_CST)) { - index = expand_expr (index_expr, 0, VOIDmode, 0); + index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); /* If the index is a short or char that we do not have an insn to handle comparisons directly, convert it to @@ -3749,7 +3758,8 @@ expand_end_case (orig_index) use_cost_table = (TREE_CODE (TREE_TYPE (orig_index)) != ENUMERAL_TYPE && estimate_case_costs (thiscase->data.case_stmt.case_list)); - balance_case_nodes (&thiscase->data.case_stmt.case_list, 0); + balance_case_nodes (&thiscase->data.case_stmt.case_list, + NULL_PTR); emit_case_nodes (index, thiscase->data.case_stmt.case_list, default_label, TREE_TYPE (index_expr)); emit_jump_if_reachable (default_label); @@ -3769,14 +3779,14 @@ expand_end_case (orig_index) > GET_MODE_BITSIZE (index_mode)) { enum machine_mode omode = TYPE_MODE (TREE_TYPE (index_expr)); - rtx rangertx = expand_expr (range, 0, VOIDmode, 0); + rtx rangertx = expand_expr (range, NULL_RTX, VOIDmode, 0); /* We must handle the endpoints in the original mode. */ index_expr = build (MINUS_EXPR, TREE_TYPE (index_expr), index_expr, minval); minval = integer_zero_node; - index = expand_expr (index_expr, 0, VOIDmode, 0); - emit_cmp_insn (rangertx, index, LTU, 0, omode, 0, 0); + index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); + emit_cmp_insn (rangertx, index, LTU, NULL_RTX, omode, 0, 0); emit_jump_insn (gen_bltu (default_label)); /* Now we can safely truncate. */ index = convert_to_mode (index_mode, index, 0); @@ -3786,14 +3796,16 @@ expand_end_case (orig_index) if (TYPE_MODE (TREE_TYPE (index_expr)) != index_mode) index_expr = convert (type_for_size (index_bits, 0), index_expr); - index = expand_expr (index_expr, 0, VOIDmode, 0); + index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); } emit_queue (); index = protect_from_queue (index, 0); do_pending_stack_adjust (); - emit_jump_insn (gen_casesi (index, expand_expr (minval, 0, VOIDmode, 0), - expand_expr (range, 0, VOIDmode, 0), + emit_jump_insn (gen_casesi (index, expand_expr (minval, NULL_RTX, + VOIDmode, 0), + expand_expr (range, NULL_RTX, + VOIDmode, 0), table_label, default_label)); win = 1; } @@ -3805,13 +3817,13 @@ expand_end_case (orig_index) fold (build (MINUS_EXPR, TREE_TYPE (index_expr), index_expr, minval))); - index = expand_expr (index_expr, 0, VOIDmode, 0); + index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); emit_queue (); index = protect_from_queue (index, 0); do_pending_stack_adjust (); do_tablejump (index, TYPE_MODE (TREE_TYPE (index_expr)), - expand_expr (range, 0, VOIDmode, 0), + expand_expr (range, NULL_RTX, VOIDmode, 0), table_label, default_label); win = 1; } @@ -3827,7 +3839,7 @@ expand_end_case (orig_index) for (n = thiscase->data.case_stmt.case_list; n; n = n->right) { - register int i + register HOST_WIDE_INT i = TREE_INT_CST_LOW (n->low) - TREE_INT_CST_LOW (minval); while (1) @@ -3903,7 +3915,7 @@ do_jump_if_equal (op1, op2, label, unsignedp) enum machine_mode mode = GET_MODE (op1); if (mode == VOIDmode) mode = GET_MODE (op2); - emit_cmp_insn (op1, op2, EQ, 0, mode, unsignedp, 0); + emit_cmp_insn (op1, op2, EQ, NULL_RTX, mode, unsignedp, 0); emit_jump_insn (gen_beq (label)); } } @@ -4318,7 +4330,7 @@ emit_case_nodes (index, node, default_label, index_type) /* Node is single valued. First see if the index expression matches this node and then check our children, if any. */ - do_jump_if_equal (index, expand_expr (node->low, 0, VOIDmode, 0), + do_jump_if_equal (index, expand_expr (node->low, NULL_RTX, VOIDmode, 0), label_rtx (node->code_label), unsignedp); if (node->right != 0 && node->left != 0) @@ -4331,8 +4343,9 @@ emit_case_nodes (index, node, default_label, index_type) if (node_is_bounded (node->right, index_type)) { - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - GT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + GT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bgt_pat) (label_rtx (node->right->code_label))); emit_case_nodes (index, node->left, default_label, index_type); @@ -4340,9 +4353,9 @@ emit_case_nodes (index, node, default_label, index_type) else if (node_is_bounded (node->left, index_type)) { - emit_cmp_insn (index, expand_expr (node->high, 0, + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, VOIDmode, 0), - LT, 0, mode, unsignedp, 0); + LT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_blt_pat) (label_rtx (node->left->code_label))); emit_case_nodes (index, node->right, default_label, index_type); } @@ -4356,9 +4369,9 @@ emit_case_nodes (index, node, default_label, index_type) = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); /* See if the value is on the right. */ - emit_cmp_insn (index, expand_expr (node->high, 0, + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, VOIDmode, 0), - GT, 0, mode, unsignedp, 0); + GT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bgt_pat) (label_rtx (test_label))); /* Value must be on the left. @@ -4387,8 +4400,9 @@ emit_case_nodes (index, node, default_label, index_type) { if (!node_has_low_bound (node, index_type)) { - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - LT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + LT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_blt_pat) (default_label)); } @@ -4399,7 +4413,8 @@ emit_case_nodes (index, node, default_label, index_type) since we haven't ruled out the numbers less than this node's value. So handle node->right explicitly. */ do_jump_if_equal (index, - expand_expr (node->right->low, 0, VOIDmode, 0), + expand_expr (node->right->low, NULL_RTX, + VOIDmode, 0), label_rtx (node->right->code_label), unsignedp); } @@ -4425,8 +4440,9 @@ emit_case_nodes (index, node, default_label, index_type) { if (!node_has_high_bound (node, index_type)) { - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - GT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + GT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bgt_pat) (default_label)); } @@ -4437,7 +4453,8 @@ emit_case_nodes (index, node, default_label, index_type) since we haven't ruled out the numbers less than this node's value. So handle node->left explicitly. */ do_jump_if_equal (index, - expand_expr (node->left->low, 0, VOIDmode, 0), + expand_expr (node->left->low, NULL_RTX, + VOIDmode, 0), label_rtx (node->left->code_label), unsignedp); } } @@ -4456,8 +4473,9 @@ emit_case_nodes (index, node, default_label, index_type) then handle the two subtrees. */ tree test_label = 0; - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - GT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + GT, NULL_RTX, mode, unsignedp, 0); if (node_is_bounded (node->right, index_type)) /* Right hand node is fully bounded so we can eliminate any @@ -4474,8 +4492,8 @@ emit_case_nodes (index, node, default_label, index_type) /* Value belongs to this node or to the left-hand subtree. */ - emit_cmp_insn (index, expand_expr (node->low, 0, VOIDmode, 0), - GE, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->low, NULL_RTX, VOIDmode, 0), + GE, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bge_pat) (label_rtx (node->code_label))); /* Handle the left-hand subtree. */ @@ -4500,15 +4518,17 @@ emit_case_nodes (index, node, default_label, index_type) if they are possible. */ if (!node_has_low_bound (node, index_type)) { - emit_cmp_insn (index, expand_expr (node->low, 0, VOIDmode, 0), - LT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->low, NULL_RTX, + VOIDmode, 0), + LT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_blt_pat) (default_label)); } /* Value belongs to this node or to the right-hand subtree. */ - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - LE, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + LE, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_ble_pat) (label_rtx (node->code_label))); emit_case_nodes (index, node->right, default_label, index_type); @@ -4520,15 +4540,16 @@ emit_case_nodes (index, node, default_label, index_type) if they are possible. */ if (!node_has_high_bound (node, index_type)) { - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - GT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + GT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bgt_pat) (default_label)); } /* Value belongs to this node or to the left-hand subtree. */ - emit_cmp_insn (index, expand_expr (node->low, 0, VOIDmode, 0), - GE, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->low, NULL_RTX, VOIDmode, 0), + GE, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bge_pat) (label_rtx (node->code_label))); emit_case_nodes (index, node->left, default_label, index_type); @@ -4542,15 +4563,17 @@ emit_case_nodes (index, node, default_label, index_type) if (!node_has_high_bound (node, index_type)) { - emit_cmp_insn (index, expand_expr (node->high, 0, VOIDmode, 0), - GT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->high, NULL_RTX, + VOIDmode, 0), + GT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_bgt_pat) (default_label)); } if (!node_has_low_bound (node, index_type)) { - emit_cmp_insn (index, expand_expr (node->low, 0, VOIDmode, 0), - LT, 0, mode, unsignedp, 0); + emit_cmp_insn (index, expand_expr (node->low, NULL_RTX, + VOIDmode, 0), + LT, NULL_RTX, mode, unsignedp, 0); emit_jump_insn ((*gen_blt_pat) (default_label)); } diff --git a/gcc/toplev.c b/gcc/toplev.c index 7bb918e..1e83193 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -853,13 +853,16 @@ report_error_function (file) } /* Report an error at the current line number. - S and V are a string and an arg for `printf'. */ + S is a string and V and V2 are args for `printf'. We use HOST_WIDE_INT + as the type for these args assuming it is wide enough to hold a + pointer. This isn't terribly portable, but is the best we can do + without vprintf universally available. */ void error (s, v, v2) char *s; - int v; /* @@also used as pointer */ - int v2; /* @@also used as pointer */ + HOST_WIDE_INT v; /* Also used as pointer */ + HOST_WIDE_INT v2; /* Also used as pointer */ { error_with_file_and_line (input_filename, lineno, s, v, v2); } @@ -872,8 +875,8 @@ error_with_file_and_line (file, line, s, v, v2) char *file; int line; char *s; - int v; - int v2; + HOST_WIDE_INT v; + HOST_WIDE_INT v2; { count_error (0); @@ -888,13 +891,14 @@ error_with_file_and_line (file, line, s, v, v2) } /* Report an error at the declaration DECL. - S and V are a string and an arg which uses %s to substitute the declaration name. */ + S and V are a string and an arg which uses %s to substitute + the declaration name. */ void error_with_decl (decl, s, v) tree decl; char *s; - int v; + HOST_WIDE_INT v; { char *junk; count_error (0); @@ -920,8 +924,8 @@ void error_for_asm (insn, s, v, v2) rtx insn; char *s; - int v; /* @@also used as pointer */ - int v2; /* @@also used as pointer */ + HOST_WIDE_INT v; /* Also used as pointer */ + HOST_WIDE_INT v2; /* Also used as pointer */ { char *filename; int line; @@ -954,9 +958,7 @@ warning_with_file_and_line (file, line, s, v, v2, v3) char *file; int line; char *s; - int v; - int v2; - int v3; + HOST_WIDE_INT v, v2, v3; { if (count_error (1) == 0) return; @@ -979,9 +981,7 @@ warning_with_file_and_line (file, line, s, v, v2, v3) void warning (s, v, v2, v3) char *s; - int v; /* @@also used as pointer */ - int v2; - int v3; + HOST_WIDE_INT v, v2, v3; /* Also used as pointer */ { warning_with_file_and_line (input_filename, lineno, s, v, v2, v3); } @@ -994,7 +994,7 @@ void warning_with_decl (decl, s, v) tree decl; char *s; - int v; + HOST_WIDE_INT v; { char *junk; @@ -1023,8 +1023,8 @@ void warning_for_asm (insn, s, v, v2) rtx insn; char *s; - int v; /* @@also used as pointer */ - int v2; /* @@also used as pointer */ + HOST_WIDE_INT v; /* Also used as pointer */ + HOST_WIDE_INT v2; /* Also used as pointer */ { char *filename; int line; @@ -1055,8 +1055,8 @@ warning_for_asm (insn, s, v, v2) void pedwarn (s, v, v2) char *s; - int v; /* @@also used as pointer */ - int v2; + HOST_WIDE_INT v; /* Also used as pointer */ + HOST_WIDE_INT v2; { if (flag_pedantic_errors) error (s, v, v2); @@ -1068,7 +1068,7 @@ void pedwarn_with_decl (decl, s, v) tree decl; char *s; - int v; + HOST_WIDE_INT v; { if (flag_pedantic_errors) error_with_decl (decl, s, v); @@ -1081,8 +1081,8 @@ pedwarn_with_file_and_line (file, line, s, v, v2) char *file; int line; char *s; - int v; - int v2; + HOST_WIDE_INT v; + HOST_WIDE_INT v2; { if (flag_pedantic_errors) error_with_file_and_line (file, line, s, v, v2); @@ -1096,7 +1096,7 @@ pedwarn_with_file_and_line (file, line, s, v, v2) void sorry (s, v, v2) char *s; - int v, v2; + HOST_WIDE_INT v, v2; { sorrycount++; if (input_filename) @@ -1115,7 +1115,7 @@ sorry (s, v, v2) void really_sorry (s, v, v2) char *s; - int v, v2; + HOST_WIDE_INT v, v2; { if (input_filename) fprintf (stderr, "%s:%d: ", input_filename, lineno); @@ -1185,11 +1185,13 @@ xrealloc (ptr, size) } /* Return the logarithm of X, base 2, considering X unsigned, - if X is a power of 2. Otherwise, returns -1. */ + if X is a power of 2. Otherwise, returns -1. + + This should be used via the `exact_log2' macro. */ int -exact_log2 (x) - register unsigned int x; +exact_log2_wide (x) + register unsigned HOST_WIDE_INT x; { register int log = 0; /* Test for 0 or a power of 2. */ @@ -1201,11 +1203,13 @@ exact_log2 (x) } /* Given X, an unsigned number, return the largest int Y such that 2**Y <= X. - If X is 0, return -1. */ + If X is 0, return -1. + + This should be used via the floor_log2 macro. */ int -floor_log2 (x) - register unsigned int x; +floor_log2_wide (x) + register unsigned HOST_WIDE_INT x; { register int log = -1; while (x != 0) @@ -1686,7 +1690,7 @@ compile_file (name) || TREE_USED (decl) || TREE_ADDRESSABLE (decl) || TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (decl))) - rest_of_decl_compilation (decl, 0, 1, 1); + rest_of_decl_compilation (decl, NULL_PTR, 1, 1); else /* Cancel the RTL for this decl so that, if debugging info output for global variables is still to come, @@ -2171,7 +2175,7 @@ rest_of_compilation (decl) { TIMEVAR (loop_time, { - loop_optimize (insns, loop_dump ? loop_dump_file : 0); + loop_optimize (insns, loop_dump_file); }); } @@ -2349,10 +2353,9 @@ rest_of_compilation (decl) TIMEVAR (global_alloc_time, { if (!obey_regdecls) - failure = global_alloc (global_reg_dump ? global_reg_dump_file : 0); + failure = global_alloc (global_reg_dump_file); else - failure = reload (insns, 0, - global_reg_dump ? global_reg_dump_file : 0); + failure = reload (insns, 0, global_reg_dump_file); }); if (global_reg_dump) @@ -2521,7 +2524,7 @@ rest_of_compilation (decl) queued up for sdb output. */ #ifdef SDB_DEBUGGING_INFO if (write_symbols == SDB_DEBUG) - sdbout_types (0); + sdbout_types (NULL_TREE); #endif /* Put back the tree of subblocks from before we copied it. @@ -537,7 +537,7 @@ obfree (ptr) char * permalloc (size) - long size; + int size; { return (char *) obstack_alloc (&permanent_obstack, size); } @@ -1055,11 +1055,13 @@ set_identifier_size (size) /* Return a newly constructed INTEGER_CST node whose constant value is specified by the two ints LOW and HI. - The TREE_TYPE is set to `int'. */ + The TREE_TYPE is set to `int'. + + This function should be used via the `build_int_2' macro. */ tree -build_int_2 (low, hi) - int low, hi; +build_int_2_wide (low, hi) + HOST_WIDE_INT low, hi; { register tree t = make_node (INTEGER_CST); TREE_INT_CST_LOW (t) = low; @@ -1105,17 +1107,17 @@ real_value_from_int_cst (i) if (TREE_INT_CST_HIGH (i) < 0) { d = (double) (~ TREE_INT_CST_HIGH (i)); - d *= ((double) (1 << (HOST_BITS_PER_INT / 2)) - * (double) (1 << (HOST_BITS_PER_INT / 2))); - d += (double) (unsigned) (~ TREE_INT_CST_LOW (i)); + d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) + * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))); + d += (double) (unsigned HOST_WIDE_INT) (~ TREE_INT_CST_LOW (i)); d = (- d - 1.0); } else { d = (double) TREE_INT_CST_HIGH (i); - d *= ((double) (1 << (HOST_BITS_PER_INT / 2)) - * (double) (1 << (HOST_BITS_PER_INT / 2))); - d += (double) (unsigned) TREE_INT_CST_LOW (i); + d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)) + * (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))); + d += (double) (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (i); } #endif /* not REAL_ARITHMETIC */ return d; @@ -1258,27 +1260,27 @@ integer_all_onesp (expr) return TREE_INT_CST_LOW (expr) == -1 && TREE_INT_CST_HIGH (expr) == -1; prec = TYPE_PRECISION (TREE_TYPE (expr)); - if (prec >= HOST_BITS_PER_INT) + if (prec >= HOST_BITS_PER_WIDE_INT) { int high_value, shift_amount; - shift_amount = prec - HOST_BITS_PER_INT; + shift_amount = prec - HOST_BITS_PER_WIDE_INT; - if (shift_amount > HOST_BITS_PER_INT) + if (shift_amount > HOST_BITS_PER_WIDE_INT) /* Can not handle precisions greater than twice the host int size. */ abort (); - else if (shift_amount == HOST_BITS_PER_INT) + else if (shift_amount == HOST_BITS_PER_WIDE_INT) /* Shifting by the host word size is undefined according to the ANSI standard, so we must handle this as a special case. */ high_value = -1; else - high_value = (1 << shift_amount) - 1; + high_value = ((HOST_WIDE_INT) 1 << shift_amount) - 1; return TREE_INT_CST_LOW (expr) == -1 && TREE_INT_CST_HIGH (expr) == high_value; } else - return TREE_INT_CST_LOW (expr) == (1 << prec) - 1; + return TREE_INT_CST_LOW (expr) == ((HOST_WIDE_INT) 1 << prec) - 1; } /* Return 1 if EXPR is an integer constant that is a power of 2 (i.e., has only @@ -1288,7 +1290,7 @@ int integer_pow2p (expr) tree expr; { - int high, low; + HOST_WIDE_INT high, low; while (TREE_CODE (expr) == NON_LVALUE_EXPR) expr = TREE_OPERAND (expr, 0); @@ -1646,7 +1648,7 @@ size_in_bytes (type) type = TYPE_MAIN_VARIANT (type); if (TYPE_SIZE (type) == 0) { - incomplete_type_error (0, type); + incomplete_type_error (NULL_TREE, type); return integer_zero_node; } return size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), @@ -1747,7 +1749,7 @@ save_expr (expr) || TREE_CODE (t) == SAVE_EXPR) return t; - t = build (SAVE_EXPR, TREE_TYPE (expr), t, current_function_decl, NULL); + t = build (SAVE_EXPR, TREE_TYPE (expr), t, current_function_decl, NULL_TREE); /* This expression might be placed ahead of a jump to ensure that the value was computed on both sides of the jump. So make sure it isn't @@ -2628,7 +2630,7 @@ build_index_type (maxval) TYPE_ALIGN (itype) = TYPE_ALIGN (sizetype); if (TREE_CODE (maxval) == INTEGER_CST) { - int maxint = TREE_INT_CST_LOW (maxval); + HOST_WIDE_INT maxint = TREE_INT_CST_LOW (maxval); return type_hash_canon (maxint > 0 ? maxint : - maxint, itype); } else @@ -2652,9 +2654,9 @@ build_index_2_type (lowval,highval) if ((TREE_CODE (lowval) == INTEGER_CST) && (TREE_CODE (highval) == INTEGER_CST)) { - int highint = TREE_INT_CST_LOW (highval); - int lowint = TREE_INT_CST_LOW (lowval); - int maxint = highint - lowint; + HOST_WIDE_INT highint = TREE_INT_CST_LOW (highval); + HOST_WIDE_INT lowint = TREE_INT_CST_LOW (lowval); + HOST_WIDE_INT maxint = highint - lowint; return type_hash_canon (maxint > 0 ? maxint : - maxint, itype); } else @@ -2818,7 +2820,8 @@ build_method_type (basetype, type) which is "this". Put it into the list of argument types. */ TYPE_ARG_TYPES (t) - = tree_cons (NULL, build_pointer_type (basetype), TYPE_ARG_TYPES (type)); + = tree_cons (NULL_TREE, + build_pointer_type (basetype), TYPE_ARG_TYPES (type)); /* If we already have such a type, use the old one and free this one. */ hashcode = TYPE_HASH (basetype) + TYPE_HASH (type); diff --git a/gcc/varasm.c b/gcc/varasm.c index 6c25b92..38ce48f 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1217,7 +1217,7 @@ assemble_real (d, mode) abort (); } - set_float_handler (0); + set_float_handler (NULL_PTR); } /* Here we combine duplicate floating constants to make @@ -1238,7 +1238,7 @@ static rtx const_double_chain; rtx immed_double_const (i0, i1, mode) - int i0, i1; + HOST_WIDE_INT i0, i1; enum machine_mode mode; { register rtx r; @@ -1250,22 +1250,24 @@ immed_double_const (i0, i1, mode) sign bit are all one. So we get either a reasonable negative value or a reasonable unsigned value for this mode. */ int width = GET_MODE_BITSIZE (mode); - if (width < HOST_BITS_PER_INT - && ((i0 & ((-1) << (width - 1))) != ((-1) << (width - 1)))) - i0 &= (1 << width) - 1, i1 = 0; - else if (width == HOST_BITS_PER_INT + if (width < HOST_BITS_PER_WIDE_INT + && ((i0 & ((HOST_WIDE_INT) (-1) << (width - 1))) + != ((HOST_WIDE_INT) (-1) << (width - 1)))) + i0 &= ((HOST_WIDE_INT) 1 << width) - 1, i1 = 0; + else if (width == HOST_BITS_PER_WIDE_INT && ! (i1 == ~0 && i0 < 0)) i1 = 0; - else if (width > 2 * HOST_BITS_PER_INT) + else if (width > 2 * HOST_BITS_PER_WIDE_INT) /* We cannot represent this value as a constant. */ abort (); - /* If MODE fits within HOST_BITS_PER_INT, always use a CONST_INT. + /* If MODE fits within HOST_BITS_PER_WIDE_INT, always use a CONST_INT. ??? Strictly speaking, this is wrong if we create a CONST_INT for a large unsigned constant with the size of MODE being - HOST_BITS_PER_INT and later try to interpret that constant in a wider - mode. In that case we will mis-interpret it as a negative number. + HOST_BITS_PER_WIDE_INT and later try to interpret that constant in a + wider mode. In that case we will mis-interpret it as a negative + number. Unfortunately, the only alternative is to make a CONST_DOUBLE for any constant in any mode if it is an unsigned constant larger @@ -1276,13 +1278,13 @@ immed_double_const (i0, i1, mode) We have always been making CONST_INTs in this case, so nothing new is being broken. */ - if (width <= HOST_BITS_PER_INT) + if (width <= HOST_BITS_PER_WIDE_INT) i1 = (i0 < 0) ? ~0 : 0; /* If this integer fits in one word, return a CONST_INT. */ if ((i1 == 0 && i0 >= 0) || (i1 == ~0 && i0 < 0)) - return gen_rtx (CONST_INT, VOIDmode, i0); + return GEN_INT (i0); /* We use VOIDmode for integers. */ mode = VOIDmode; @@ -1345,7 +1347,7 @@ immed_real_const_1 (d, mode) else if (REAL_VALUES_EQUAL (dconst1, d)) return CONST1_RTX (mode); - if (sizeof u == 2 * sizeof (int)) + if (sizeof u == 2 * sizeof (HOST_WIDE_INT)) return immed_double_const (u.i[0], u.i[1], mode); /* The rest of this function handles the case where @@ -2579,7 +2581,7 @@ output_constant (exp, size) || TREE_CODE (exp) == NON_LVALUE_EXPR) exp = TREE_OPERAND (exp, 0); - if (! assemble_integer (expand_expr (exp, 0, VOIDmode, + if (! assemble_integer (expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_INITIALIZER), size, 0)) error ("initializer for integer value is too complicated"); @@ -2654,7 +2656,7 @@ output_constructor (exp, size) int byte_buffer_in_use = 0; register int byte; - if (HOST_BITS_PER_INT < BITS_PER_UNIT) + if (HOST_BITS_PER_WIDE_INT < BITS_PER_UNIT) abort (); if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE) @@ -2809,26 +2811,27 @@ output_constructor (exp, size) shift = end_offset - next_offset - this_time; /* Don't try to take a bunch of bits that cross the word boundary in the INTEGER_CST. */ - if (shift < HOST_BITS_PER_INT - && shift + this_time > HOST_BITS_PER_INT) + if (shift < HOST_BITS_PER_WIDE_INT + && shift + this_time > HOST_BITS_PER_WIDE_INT) { - this_time -= (HOST_BITS_PER_INT - shift); - shift = HOST_BITS_PER_INT; + this_time -= (HOST_BITS_PER_WIDE_INT - shift); + shift = HOST_BITS_PER_WIDE_INT; } /* Now get the bits from the appropriate constant word. */ - if (shift < HOST_BITS_PER_INT) + if (shift < HOST_BITS_PER_WIDE_INT) { value = TREE_INT_CST_LOW (val); } - else if (shift < 2 * HOST_BITS_PER_INT) + else if (shift < 2 * HOST_BITS_PER_WIDE_INT) { value = TREE_INT_CST_HIGH (val); - shift -= HOST_BITS_PER_INT; + shift -= HOST_BITS_PER_WIDE_INT; } else abort (); - byte |= (((value >> shift) & ((1 << this_time) - 1)) + byte |= (((value >> shift) + & (((HOST_WIDE_INT) 1 << this_time) - 1)) << (BITS_PER_UNIT - this_time - next_bit)); #else /* On little-endian machines, @@ -2839,24 +2842,25 @@ output_constructor (exp, size) - TREE_INT_CST_LOW (DECL_FIELD_BITPOS (field))); /* Don't try to take a bunch of bits that cross the word boundary in the INTEGER_CST. */ - if (shift < HOST_BITS_PER_INT - && shift + this_time > HOST_BITS_PER_INT) + if (shift < HOST_BITS_PER_WIDE_INT + && shift + this_time > HOST_BITS_PER_WIDE_INT) { - this_time -= (HOST_BITS_PER_INT - shift); - shift = HOST_BITS_PER_INT; + this_time -= (HOST_BITS_PER_WIDE_INT - shift); + shift = HOST_BITS_PER_WIDE_INT; } /* Now get the bits from the appropriate constant word. */ if (shift < HOST_BITS_PER_INT) value = TREE_INT_CST_LOW (val); - else if (shift < 2 * HOST_BITS_PER_INT) + else if (shift < 2 * HOST_BITS_PER_WIDE_INT) { value = TREE_INT_CST_HIGH (val); - shift -= HOST_BITS_PER_INT; + shift -= HOST_BITS_PER_WIDE_INT; } else abort (); - byte |= ((value >> shift) & ((1 << this_time) - 1)) << next_bit; + byte |= ((value >> shift) + & (((HOST_WIDE_INT) 1 << this_time) - 1)) << next_bit; #endif next_offset += this_time; byte_buffer_in_use = 1; |