* mips-tdep.c (mips32_scan_prologue): Correct indentation.

This commit is contained in:
Maciej W. Rozycki 2012-03-01 23:35:46 +00:00
parent b38716c63a
commit 1908093124
2 changed files with 33 additions and 29 deletions

View File

@ -1,3 +1,7 @@
2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
* mips-tdep.c (mips32_scan_prologue): Correct indentation.
2012-03-01 Maciej W. Rozycki <macro@codesourcery.com> 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
* mips-tdep.c (mips_gdbarch_init): Only set pc_regnum and * mips-tdep.c (mips_gdbarch_init): Only set pc_regnum and

View File

@ -2269,43 +2269,43 @@ restart:
|| inst == 0x0399e021 /* addu $gp,$gp,$t9 */ || inst == 0x0399e021 /* addu $gp,$gp,$t9 */
|| inst == 0x033ce021 /* addu $gp,$t9,$gp */ || inst == 0x033ce021 /* addu $gp,$t9,$gp */
) )
{ {
/* These instructions are part of the prologue, but we don't /* These instructions are part of the prologue, but we don't
need to do anything special to handle them. */ need to do anything special to handle them. */
} }
/* The instructions below load $at or $t0 with an immediate /* The instructions below load $at or $t0 with an immediate
value in preparation for a stack adjustment via value in preparation for a stack adjustment via
subu $sp,$sp,[$at,$t0]. These instructions could also subu $sp,$sp,[$at,$t0]. These instructions could also
initialize a local variable, so we accept them only before initialize a local variable, so we accept them only before
a stack adjustment instruction was seen. */ a stack adjustment instruction was seen. */
else if (!seen_sp_adjust else if (!seen_sp_adjust
&& (high_word == 0x3c01 /* lui $at,n */ && (high_word == 0x3c01 /* lui $at,n */
|| high_word == 0x3c08 /* lui $t0,n */ || high_word == 0x3c08 /* lui $t0,n */
|| high_word == 0x3421 /* ori $at,$at,n */ || high_word == 0x3421 /* ori $at,$at,n */
|| high_word == 0x3508 /* ori $t0,$t0,n */ || high_word == 0x3508 /* ori $t0,$t0,n */
|| high_word == 0x3401 /* ori $at,$zero,n */ || high_word == 0x3401 /* ori $at,$zero,n */
|| high_word == 0x3408 /* ori $t0,$zero,n */ || high_word == 0x3408 /* ori $t0,$zero,n */
)) ))
{ {
if (end_prologue_addr == 0) if (end_prologue_addr == 0)
load_immediate_bytes += MIPS_INSN32_SIZE; /* FIXME! */ load_immediate_bytes += MIPS_INSN32_SIZE; /* FIXME! */
} }
else else
{ {
/* This instruction is not an instruction typically found /* This instruction is not an instruction typically found
in a prologue, so we must have reached the end of the in a prologue, so we must have reached the end of the
prologue. */ prologue. */
/* FIXME: brobecker/2004-10-10: Can't we just break out of this /* FIXME: brobecker/2004-10-10: Can't we just break out of this
loop now? Why would we need to continue scanning the function loop now? Why would we need to continue scanning the function
instructions? */ instructions? */
if (end_prologue_addr == 0) if (end_prologue_addr == 0)
end_prologue_addr = cur_pc; end_prologue_addr = cur_pc;
/* Check for branches and jumps. For now, only jump to /* Check for branches and jumps. For now, only jump to
register are caught (i.e. returns). */ register are caught (i.e. returns). */
if ((itype_op (inst) & 0x07) == 0 && rtype_funct (inst) == 8) if ((itype_op (inst) & 0x07) == 0 && rtype_funct (inst) == 8)
in_delay_slot = 1; in_delay_slot = 1;
} }
/* If the previous instruction was a jump, we must have reached /* If the previous instruction was a jump, we must have reached
the end of the prologue by now. Stop scanning so that we do the end of the prologue by now. Stop scanning so that we do