Parcourir la source

* teach peephole optimizer about ror/rol
* md5 unit uses system.rol

git-svn-id: trunk@11468 -

florian il y a 17 ans
Parent
commit
572fe6282e
2 fichiers modifiés avec 1 ajouts et 8 suppressions
  1. 1 1
      compiler/i386/csopt386.pas
  2. 0 7
      packages/hash/src/md5.pp

+ 1 - 1
compiler/i386/csopt386.pas

@@ -1022,7 +1022,7 @@ var
 begin
   case p.opcode of
     A_IMUL: noHardCodedRegs := p.ops <> 1;
-    A_SHL,A_SHR,A_SHLD,A_SHRD: noHardCodedRegs :=
+    A_SHL,A_SHR,A_ROR,A_ROL,A_SAR,A_SHLD,A_SHRD: noHardCodedRegs :=
       (p.oper[0]^.typ <> top_reg) or
       ((orgReg <> RS_ECX) and (newReg <> RS_ECX));
     else

+ 0 - 7
packages/hash/src/md5.pp

@@ -149,13 +149,6 @@ function MD5Match(const Digest1, Digest2: TMD5Digest): Boolean; inline;
 
 implementation
 
-
-function rol(x: Cardinal; n: Byte): Cardinal;
-begin
-  Result := (x shl n) or (x shr (32 - n));
-end;
-
-
 // inverts the bytes of (Count div 4) cardinals from source to target.
 procedure Invert(Source, Dest: Pointer; Count: PtrUInt);
 var