瀏覽代碼

Merge pull request #4581 from richardkchapman/32-bit-fold-core

HPCC-9587 Ubuntu 12.04 32bit eclcc cores on constant folding

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 12 年之前
父節點
當前提交
a0f7995349
共有 1 個文件被更改,包括 5 次插入8 次删除
  1. 5 8
      ecl/hql/hqlfold.cpp

+ 5 - 8
ecl/hql/hqlfold.cpp

@@ -921,23 +921,20 @@ IValue * foldExternalCall(IHqlExpression* expr, unsigned foldOptions, ITemplateC
 #else 
         // 32-bit -------------------------------------------------
         int dummy1, dummy2,dummy3;
-        __asm__ (
+        __asm__ __volatile__(
+            "push   %%ebx \n\t"
+            "movl   %%ecx, %%ebx \n\t"
             "subl   %%ecx, %%esp \n\t"
             "movl   %%esp, %%edi \n\t"
             "cld \n\t"
             "rep \n\t"
             "movsb \n\t"
             "call   *%%edx \n\t"
+            "addl    %%ebx, %%esp \n\t"
+            "pop    %%ebx \n\t"
             : "=a"(intresult),"=d"(intresulthigh),"=c"(dummy1),"=S"(dummy2),"=D"(dummy3)
             : "c"(len),"S"(strbuf),"d"(fh)
             );
-        
-        // Restore stack pointer
-        __asm__  __volatile__(
-            "addl    %%ecx, %%esp \n\t"
-            : 
-            : "c"(len)
-        );
 
         // Get real (float/double) return values;
         if(isRealvalue)