PERFORCE change 112616 for review
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Sat Jan 6 11:34:03 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=112616
Change 112616 by gonzo at gonzo_hq on 2007/01/06 19:33:17
o Make stack 64-bit aligned: required by ABI to pass
64-bits arguments.
Affected files ...
.. //depot/projects/mips2/src/lib/csu/mips/crt1.c#4 edit
Differences ...
==== //depot/projects/mips2/src/lib/csu/mips/crt1.c#4 (text+ko) ====
@@ -80,15 +80,20 @@
" .globl _start \n"
" _start: \n"
" /* Get argc, argv from stack */ \n"
+" /* lw a0, 0(sp) */\n"
+" /* move a1, sp */\n"
+" /* addu a1, 4 */\n"
" \n"
-" /* lw a0, 0(sp) */\n"
-" /* move a1, sp */\n"
-" /* addu a1, 4 */\n"
+" /* Stack should 8bytes aligned */\n"
+" /* required by ABI to pass */\n"
+" /* 64-bits arguments */\n"
+" /* and sp, ~8 */\n"
" \n"
" lw $4, 0($29) \n"
" move $5, $29 \n"
" addu $5, 4 \n"
-" /* TODO: Ensure the stack is properly aligned before calling C code. */\n"
+" \n"
+" and $29, 0xfffffff8 \n"
"\n"
" j __start ");
/* ARGSUSED */
More information about the p4-projects
mailing list