b=503205; [arm] stop hitting bogus assertion in nPatchBranch; r=crashy

This commit is contained in:
Vladimir Vukicevic 2009-07-08 16:46:57 -07:00
parent 941b6d3350
commit a678e18942

View File

@ -583,9 +583,10 @@ Assembler::nPatchBranch(NIns* at, NIns* target)
// and reset at[1] for good measure
at[1] = BKPT_insn;
} else {
// at[0] should already hold the correct instruction, so we just need
// to update the target.
NanoAssert(at[0] == (NIns)( COND_AL | (0x51<<20) | (PC<<16) | (PC<<12) | (4) ));
// Emit a branch to a pc-relative address, which we'll store right
// after this instruction
at[0] = (NIns)( COND_AL | (0x51<<20) | (PC<<16) | (PC<<12) | (4) );
// the target address
at[1] = (NIns)(target);
}
VALGRIND_DISCARD_TRANSLATIONS(at, 2*sizeof(NIns));