فهرست منبع

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

Pierre Muller 3 ماه پیش
والد
کامیت
e42b16beb4
2فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  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;