From 31040e4d80caab57dac1fd7f28b7a59815dca43e Mon Sep 17 00:00:00 2001 From: Xianyi Date: Fri, 3 Jun 2011 13:19:54 +0800 Subject: [PATCH] Fixed #32 a SEGFAULT bug with gcc-4.6. According to i386 calling convention, The called funtion should remove the hidden return value address from the stack. --- Changelog.txt | 1 + kernel/x86/zdot_sse2.S | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 461058279..60798d2a9 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -21,6 +21,7 @@ common: x86/x86_64: * Fixed #28 a wrong result of dsdot on x86_64. + * Fixed #32 a SEGFAULT bug of zdotc with gcc-4.6. MIPS64: * Fixed #28 a wrong result of dsdot on Loongson3A/MIPS64. diff --git a/kernel/x86/zdot_sse2.S b/kernel/x86/zdot_sse2.S index 5aeefde31..2a174fb5d 100644 --- a/kernel/x86/zdot_sse2.S +++ b/kernel/x86/zdot_sse2.S @@ -1541,5 +1541,8 @@ popl %ebx popl %esi popl %edi +/*remove the hidden return value address from the stack.*/ + popl %ecx + xchgl %ecx, 0(%esp) ret EPILOGUE