X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ms%2Fuplink-x86.pl;h=bad4901802e3e2ad42d8b8cfb66abc1ad91a779c;hp=0dffc14fcd2ead24fc4c110b928ac17cc3c4b18f;hb=HEAD;hpb=4c048211f19d587133d4d688f5b1045a0bd4cb15 diff --git a/ms/uplink-x86.pl b/ms/uplink-x86.pl index 0dffc14fcd..bad4901802 100755 --- a/ms/uplink-x86.pl +++ b/ms/uplink-x86.pl @@ -1,4 +1,10 @@ -#!/usr/bin/env perl +#! /usr/bin/env perl +# Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; push(@INC, "${dir}.", "${dir}../crypto/perlasm"); @@ -6,7 +12,9 @@ require "x86asm.pl"; require "uplink-common.pl"; -&asm_init($ARGV[0],"uplink-x86"); +$output = pop and open STDOUT,">$output"; + +&asm_init($ARGV[0]); &external_label("OPENSSL_Uplink"); &public_label("OPENSSL_UplinkTable"); @@ -14,11 +22,11 @@ require "uplink-common.pl"; for ($i=1;$i<=$N;$i++) { &function_begin_B("_\$lazy${i}"); &lea ("eax",&DWP(&label("OPENSSL_UplinkTable"))); - &push ("eax"); &push ($i); + &push ("eax"); &call (&label("OPENSSL_Uplink")); - &add ("esp",8); &pop ("eax"); + &add ("esp",4); &jmp_ptr(&DWP(4*$i,"eax")); &function_end_B("_\$lazy${i}"); } @@ -31,3 +39,5 @@ for ($i=1;$i<=$N;$i++) { &data_word(&label("_\$lazy${i}")); } &asm_finish(); + +close STDOUT;