diff options
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 15663c1..affb219 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -867,7 +867,7 @@ emit_stack_save (save_level, psave, after) rtx sa = *psave; /* The default is that we use a move insn and save in a Pmode object. */ rtx (*fcn) () = gen_move_insn; - enum machine_mode mode = Pmode; + enum machine_mode mode = STACK_SAVEAREA_MODE (save_level); /* See if this machine has anything special to do for this kind of save. */ switch (save_level) @@ -875,28 +875,19 @@ emit_stack_save (save_level, psave, after) #ifdef HAVE_save_stack_block case SAVE_BLOCK: if (HAVE_save_stack_block) - { - fcn = gen_save_stack_block; - mode = insn_operand_mode[CODE_FOR_save_stack_block][0]; - } + fcn = gen_save_stack_block; break; #endif #ifdef HAVE_save_stack_function case SAVE_FUNCTION: if (HAVE_save_stack_function) - { - fcn = gen_save_stack_function; - mode = insn_operand_mode[CODE_FOR_save_stack_function][0]; - } + fcn = gen_save_stack_function; break; #endif #ifdef HAVE_save_stack_nonlocal case SAVE_NONLOCAL: if (HAVE_save_stack_nonlocal) - { - fcn = gen_save_stack_nonlocal; - mode = insn_operand_mode[(int) CODE_FOR_save_stack_nonlocal][0]; - } + fcn = gen_save_stack_nonlocal; break; #endif default: @@ -975,7 +966,6 @@ emit_stack_restore (save_level, sa, after) break; #endif #ifdef HAVE_restore_stack_nonlocal - case SAVE_NONLOCAL: if (HAVE_restore_stack_nonlocal) fcn = gen_restore_stack_nonlocal; @@ -1243,18 +1233,15 @@ allocate_dynamic_stack_space (size, target, known_align) #ifdef HAVE_allocate_stack if (HAVE_allocate_stack) { - enum machine_mode mode; - if (insn_operand_predicate[(int) CODE_FOR_allocate_stack][0] && ! ((*insn_operand_predicate[(int) CODE_FOR_allocate_stack][0]) (target, Pmode))) target = copy_to_mode_reg (Pmode, target); - mode = insn_operand_mode[(int) CODE_FOR_allocate_stack][1]; - size = convert_modes (mode, ptr_mode, size, 1); + size = convert_modes (Pmode, ptr_mode, size, 1); if (insn_operand_predicate[(int) CODE_FOR_allocate_stack][1] && ! ((*insn_operand_predicate[(int) CODE_FOR_allocate_stack][1]) - (size, mode))) - size = copy_to_mode_reg (mode, size); + (size, Pmode))) + size = copy_to_mode_reg (Pmode, size); emit_insn (gen_allocate_stack (target, size)); } |