Date: Mon, 14 Aug 2006 08:50:57 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 103819 for review Message-ID: <200608140850.k7E8ovoN052642@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103819 Change 103819 by gonzo@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608140850.k7E8ovoN052642>