瀏覽代碼

* prt0.as exit code handling fixed
* int64 mod int64 for negative numbers fixed

florian 21 年之前
父節點
當前提交
d18f952c09
共有 2 個文件被更改,包括 21 次插入16 次删除
  1. 14 13
      rtl/inc/int64.inc
  2. 7 3
      rtl/linux/x86_64/prt0.as

+ 14 - 13
rtl/inc/int64.inc

@@ -263,22 +263,19 @@
          if n=0 then
            HandleErrorFrame(200,get_frame);
          if n<0 then
-           begin
-              nq:=-n;
-              signed:=true;
-           end
+           nq:=-n
          else
-           begin
-              signed:=false;
-              nq:=n;
-           end;
+           nq:=n;
          if z<0 then
            begin
-              zq:=qword(-z);
-              signed:=not(signed);
+             signed:=true;
+             zq:=qword(-z)
            end
          else
-           zq:=z;
+           begin
+             signed:=false;
+             zq:=z;
+           end;
          r:=zq mod nq;
          if signed then
            fpc_mod_int64:=-int64(r)
@@ -562,7 +559,11 @@
 
 {
   $Log$
-  Revision 1.23  2004-01-23 15:14:04  florian
+  Revision 1.24  2004-04-24 17:14:09  florian
+    * prt0.as exit code handling fixed
+    * int64 mod int64 for negative numbers fixed
+
+  Revision 1.23  2004/01/23 15:14:04  florian
     + implemented software shl/shr for 64 bit ints
 
   Revision 1.22  2003/09/14 11:34:13  peter
@@ -597,4 +598,4 @@
   Revision 1.14  2002/07/01 16:29:05  peter
     * sLineBreak changed to normal constant like Kylix
 
-}
+}

+ 7 - 3
rtl/linux/x86_64/prt0.as

@@ -59,8 +59,8 @@ _start:
         .type   _haltproc,@function
 _haltproc:
         movl    $60,%eax                 /* exit call */
-        xorq    %rbx,%rbx
-        movw    U_SYSTEM_EXITCODE,%bx
+	xorq	%rdi,%rdi
+        movw    U_SYSTEM_EXITCODE,%di
         syscall
         jmp     _haltproc
 
@@ -90,7 +90,11 @@ __data_start:
 
 #
 # $Log$
-# Revision 1.6  2004-04-20 20:30:11  florian
+# Revision 1.7  2004-04-24 17:14:09  florian
+#   * prt0.as exit code handling fixed
+#   * int64 mod int64 for negative numbers fixed
+#
+# Revision 1.6  2004/04/20 20:30:11  florian
 #   * fixed halt code
 #
 # Revision 1.5  2004/04/12 19:05:55  florian