Browse Source

* fixed comparedword
* fixed properties

git-svn-id: trunk@8811 -

Jonas Maebe 18 năm trước cách đây
mục cha
commit
107682e148
2 tập tin đã thay đổi với 14 bổ sung5 xóa
  1. 1 1
      .gitattributes
  2. 13 4
      rtl/powerpc/powerpc.inc

+ 1 - 1
.gitattributes

@@ -5282,7 +5282,7 @@ rtl/powerpc/makefile.cpu svneol=native#text/plain
 rtl/powerpc/math.inc svneol=native#text/plain
 rtl/powerpc/math.inc svneol=native#text/plain
 rtl/powerpc/mathu.inc svneol=native#text/plain
 rtl/powerpc/mathu.inc svneol=native#text/plain
 rtl/powerpc/mathuh.inc svneol=native#text/plain
 rtl/powerpc/mathuh.inc svneol=native#text/plain
-rtl/powerpc/powerpc.inc -text
+rtl/powerpc/powerpc.inc svneol=native#text/plain
 rtl/powerpc/set.inc svneol=native#text/plain
 rtl/powerpc/set.inc svneol=native#text/plain
 rtl/powerpc/setjump.inc svneol=native#text/plain
 rtl/powerpc/setjump.inc svneol=native#text/plain
 rtl/powerpc/setjumph.inc svneol=native#text/plain
 rtl/powerpc/setjumph.inc svneol=native#text/plain

+ 13 - 4
rtl/powerpc/powerpc.inc

@@ -768,10 +768,19 @@ asm
         lwzu    r9,4(r11)
         lwzu    r9,4(r11)
         lwzu    r10,4(r4)
         lwzu    r10,4(r4)
         { calculate difference }
         { calculate difference }
-        sub.    r3,r9,r10
+        sub.    r0,r9,r10
         { if chars not equal or at the end, we're ready }
         { if chars not equal or at the end, we're ready }
         bdnzt   cr0*4+eq, .LCompDWordLoop
         bdnzt   cr0*4+eq, .LCompDWordLoop
 .LCompDWordDone:
 .LCompDWordDone:
+        cmplw cr1,r9,r10
+        beq .Ldone
+        { since these were two dwords, we have to perform an additional }
+        { unsigned comparison and set the result accordingly            }
+        bgt cr1,.Lpos
+        li r3,-2
+.Lpos:
+        addi r3,r3,1
+.Ldone:
 end;
 end;
 {$endif FPC_SYSTEM_HAS_COMPAREDWORD}
 {$endif FPC_SYSTEM_HAS_COMPAREDWORD}
 
 
@@ -1248,9 +1257,9 @@ begin
      lfd f1,8(r1)
      lfd f1,8(r1)
      mtfsf 7,f1
      mtfsf 7,f1
   end;
   end;
-  { powerpc might use softfloat code }
-  softfloat_exception_flags:=0;
-  softfloat_exception_mask:=float_flag_underflow or float_flag_inexact or float_flag_denormal;
+  { powerpc might use softfloat code }
+  softfloat_exception_flags:=0;
+  softfloat_exception_mask:=float_flag_underflow or float_flag_inexact or float_flag_denormal;
 end;
 end;
 {$ENDIF}
 {$ENDIF}