Parcourir la source

* corrected comment in x86 division code - it said "signed", when it actually meant "negative"

git-svn-id: trunk@36799 -
nickysn il y a 8 ans
Parent
commit
bb7cd4866d
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 2 2
      compiler/i8086/n8086mat.pas
  2. 2 2
      compiler/x86/nx86mat.pas

+ 2 - 2
compiler/i8086/n8086mat.pas

@@ -136,9 +136,9 @@ implementation
                         { no jumps, but more operations }
                         hreg2:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
                         emit_reg_reg(A_MOV,S_W,hreg1,hreg2);
-                        {If the left value is signed, hreg2=$ffff, otherwise 0.}
+                        {If the left value is negative, hreg2=$ffff, otherwise 0.}
                         cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SAR,OS_16,15,hreg2);
-                        {If signed, hreg2=right value-1, otherwise 0.}
+                        {If negative, hreg2=right value-1, otherwise 0.}
                         emit_const_reg(A_AND,S_W,tordconstnode(right).value.svalue-1,hreg2);
                         { add to the left value }
                         emit_reg_reg(A_ADD,S_W,hreg2,hreg1);

+ 2 - 2
compiler/x86/nx86mat.pas

@@ -421,9 +421,9 @@ interface
                     { no jumps, but more operations }
                     hreg2:=cg.getintregister(current_asmdata.CurrAsmList,cgsize);
                     emit_reg_reg(A_MOV,opsize,hreg1,hreg2);
-                    {If the left value is signed, hreg2=$ffffffff, otherwise 0.}
+                    {If the left value is negative, hreg2=$ffffffff, otherwise 0.}
                     emit_const_reg(A_SAR,opsize,resultdef.size*8-1,hreg2);
-                    {If signed, hreg2=right value-1, otherwise 0.}
+                    {If negative, hreg2=right value-1, otherwise 0.}
                     { (don't use emit_const_reg, because if value>high(longint)
                        then it must first be loaded into a register) }
                     cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_AND,cgsize,tordconstnode(right).value-1,hreg2);