shithub: riscv

Download patch

ref: 868a262bb849dcdfbf5be6f15f2942421d5a2223
parent: c76243e7e59ffdbcc1a7785f2ca6237128569919
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Feb 5 14:48:36 EST 2014

pc64: dont 4 byte align stack pointer for amd64 in sysexec()

--- a/sys/src/9/port/sysproc.c
+++ b/sys/src/9/port/sysproc.c
@@ -361,7 +361,7 @@
 	 * 8-byte align SP for those (e.g. sparc) that need it.
 	 * execregs() will subtract another 4 bytes for argc.
 	 */
-	if((ssize+4) & 7)
+	if(BY2WD == 4 && (ssize+4) & 7)
 		ssize += 4;
 
 	if(PGROUND(ssize) >= USTKSIZE)