PERFORCE change 103819 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Mon Aug 14 08:51:06 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103819
Change 103819 by gonzo at gonzo_hq on 2006/08/14 08:50:21
o Make threads' stack aligned to 8 bytes. It's
required by EABI for proper handling of 64-bits
arguments in va_args.
Affected files ...
.. //depot/projects/mips2/src/sys/mips/mips/vm_machdep.c#7 edit
Differences ...
==== //depot/projects/mips2/src/sys/mips/mips/vm_machdep.c#7 (text+ko) ====
@@ -188,10 +188,11 @@
* Enable interrupts and unmask timer interrupt (HW IRQ5)
*/
td->td_pcb->pcb_regs[PCB_REG_SR] = MIPS_SR_INT_IE |
- (((1 << 5) << 8) << 2);
+ (((1 << 5) << 8) << 2);
- /* Stack pointer. */
- td->td_pcb->pcb_regs[PCB_REG_SP] = (register_t)_ALIGN(td->td_frame - 1);
+ /* Stack pointer. Should be double-word aligned due to EABI */
+ td->td_pcb->pcb_regs[PCB_REG_SP] =
+ (register_t)((uint32_t)(td->td_frame - 1) & ~7);
}
void
More information about the p4-projects
mailing list