Explorar o código

Disable assembly code in hash sha1 and fcl-hash fpsha256 units if -dOLD_ASSEMBLER compiler option is used

Pierre Muller hai 3 meses
pai
achega
e42b16beb4
Modificáronse 2 ficheiros con 6 adicións e 2 borrados
  1. 3 1
      packages/fcl-hash/src/fpsha256.pp
  2. 3 1
      packages/hash/src/sha1.pp

+ 3 - 1
packages/fcl-hash/src/fpsha256.pp

@@ -14,7 +14,9 @@
 
 // Normally, if an optimized version is available for OS/CPU, that will be used
 // Define to force to use implementation in pascal
-{ $DEFINE SHA256PASCAL}
+{$ifdef OLD_ASSEMBLER}
+  {$DEFINE SHA256PASCAL}
+{$endif OLD_ASSEMBLER}
 
 {$IFNDEF FPC_DOTTEDUNITS}
 unit fpsha256;

+ 3 - 1
packages/hash/src/sha1.pp

@@ -15,7 +15,9 @@
 
 // Normally, if an optimized version is available for OS/CPU, that will be used
 // Define to use existing unoptimized implementation
-{ $DEFINE SHA1PASCAL}
+{$ifdef OLD_ASSEMBLER}
+  {$DEFINE SHA1PASCAL}
+{$endif OLD_ASSEMBLER}
 
 {$IFNDEF FPC_DOTTEDUNITS}
 unit sha1;