Quellcode durchsuchen

Merged revisions 4145,4147 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

git-svn-id: branches/fixes_2_0@4148 -

florian vor 19 Jahren
Ursprung
Commit
04e54e691d
2 geänderte Dateien mit 18 neuen und 0 gelöschten Zeilen
  1. 4 0
      rtl/i386/i386.inc
  2. 14 0
      rtl/i386/mmx.pp

+ 4 - 0
rtl/i386/i386.inc

@@ -55,9 +55,11 @@ function sse_support : boolean;
     if cpuid_support then
      begin
         asm
+          pushl %ebx
           movl $1,%eax
           cpuid
           movl %edx,_edx
+          popl %ebx          
         end;
         sse_support:=((_edx and $2000000)<>0) and os_supports_sse;
      end
@@ -77,9 +79,11 @@ function mmx_support : boolean;
      if cpuid_support then
        begin
           asm
+             pushl %ebx
              movl $1,%eax
              cpuid
              movl %edx,_edx
+             popl %ebx            
           end;
           mmx_support:=(_edx and $800000)<>0;
        end

+ 14 - 0
rtl/i386/mmx.pp

@@ -70,11 +70,13 @@ unit mmx;
         if cpuid_support then
         begin
             asm
+                pushl %ebx
                 movl $0,%eax
                 cpuid
                 movl %ebx,_ebx
                 movl %ecx,_ecx
                 movl %edx,_edx
+                popl %ebx
             end;
             if ((_ebx=$68747541) and (_ecx=$444D4163) and (_edx=$69746E65)) then getdevel:=10;
             if ((_ebx=$756E6547) and (_ecx=$6C65746E) and (_edx=$49656E69)) then getdevel:=20;
@@ -92,9 +94,11 @@ unit mmx;
          if cpuid_support then
            begin
               asm
+                 pushl %ebx
                  movl $1,%eax
                  cpuid
                  movl %edx,_edx
+                 popl %ebx
               end;
               mmx_support:=(_edx and $800000)<>0;
            end
@@ -113,9 +117,11 @@ unit mmx;
          if cpuid_support and (getdevel=10) then
            begin
               asm
+                 pushl %ebx
                  movl $0x80000001,%eax
                  cpuid
                  movl %edx,_edx
+                 popl %ebx
               end;
               amd_3d_support:=(_edx and $80000000)<>0;
            end
@@ -134,9 +140,11 @@ unit mmx;
          if cpuid_support and (getdevel=10) then
            begin
               asm
+                 pushl %ebx
                  movl $0x80000001,%eax
                  cpuid
                  movl %edx,_edx
+                 popl %ebx
               end;
               amd_3d_dsp_support:=(_edx and $40000000)<>0;
            end
@@ -155,9 +163,11 @@ unit mmx;
          if cpuid_support and (getdevel=10) then
            begin
               asm
+                 pushl %ebx
                  movl $0x80000001,%eax
                  cpuid
                  movl %edx,_edx
+                 popl %ebx
               end;
               amd_3d_mmx_support:=(_edx and $400000)<>0;
            end
@@ -175,9 +185,11 @@ unit mmx;
          if cpuid_support then
            begin
               asm
+                 pushl %ebx
                  movl $1,%eax
                  cpuid
                  movl %edx,_edx
+                 popl %ebx
               end;
               sse_support:=(_edx and $2000000)<>0;
            end
@@ -195,9 +207,11 @@ unit mmx;
          if cpuid_support then
            begin
               asm
+                 pushl %ebx
                  movl $1,%eax
                  cpuid
                  movl %edx,_edx
+                 popl %ebx
               end;
               sse2_support:=(_edx and $4000000)<>0;
            end