Unified - adapt the generation of rc4 assembler to use GENERATE
[openssl.git] / crypto / rc4 / asm / rc4-ia64.pl
index 988eec1e94c79f0abf158ebb7a207b0188f3aa13..b83e53a6050159da2fdef357dbd99765eb31e8c2 100644 (file)
 #     random input data).
 #
 
+$output = pop;
+open STDOUT,">$output";
+
 $phases = 4;           # number of stages/phases in the pipelined-loop
 $unroll_count = 6;     # number of times we unrolled it
 $pComI = (1 << 0);
@@ -231,7 +234,7 @@ sub emit_body {
 ___
 
     if (($p & 0xf) == 0) {
-       $c.="#ifdef RC4_BIG_ENDIAN\n";
+       $c.="#ifdef HOST_IS_BIG_ENDIAN\n";
        &I(\$c,"shr.u   OutWord[%u] = OutWord[%u], 32;;",
                                $iw1 % $NOutWord, $iw1 % $NOutWord);
        $c.="#endif\n";
@@ -392,7 +395,7 @@ $code=<<___;
 /* Define a macro for the bit number of the n-th byte: */
 
 #if defined(_HPUX_SOURCE) || defined(B_ENDIAN)
-# define RC4_BIG_ENDIAN
+# define HOST_IS_BIG_ENDIAN
 # define BYTE_POS(n)   (56 - (8 * (n)))
 #else
 # define BYTE_POS(n)   (8 * (n))
@@ -753,3 +756,5 @@ $code.=<<___;
 ___
 
 print $code;
+
+close STDOUT;