2016-04-20 10:10:43 +08:00
|
|
|
#! /usr/bin/env perl
|
|
|
|
# Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the OpenSSL license (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
|
2008-07-22 16:47:35 +08:00
|
|
|
|
|
|
|
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
|
|
|
push(@INC, "${dir}.", "${dir}../crypto/perlasm");
|
|
|
|
require "x86asm.pl";
|
|
|
|
|
|
|
|
require "uplink-common.pl";
|
|
|
|
|
2016-03-07 22:00:45 +08:00
|
|
|
$output = pop;
|
|
|
|
open STDOUT,">$output";
|
|
|
|
|
2017-05-11 02:24:56 +08:00
|
|
|
&asm_init($ARGV[0]);
|
2008-07-22 16:47:35 +08:00
|
|
|
|
|
|
|
&external_label("OPENSSL_Uplink");
|
|
|
|
&public_label("OPENSSL_UplinkTable");
|
|
|
|
|
|
|
|
for ($i=1;$i<=$N;$i++) {
|
|
|
|
&function_begin_B("_\$lazy${i}");
|
|
|
|
&lea ("eax",&DWP(&label("OPENSSL_UplinkTable")));
|
|
|
|
&push ($i);
|
2016-02-09 18:53:11 +08:00
|
|
|
&push ("eax");
|
2008-07-22 16:47:35 +08:00
|
|
|
&call (&label("OPENSSL_Uplink"));
|
|
|
|
&pop ("eax");
|
2016-02-09 18:53:11 +08:00
|
|
|
&add ("esp",4);
|
2008-07-22 16:47:35 +08:00
|
|
|
&jmp_ptr(&DWP(4*$i,"eax"));
|
|
|
|
&function_end_B("_\$lazy${i}");
|
|
|
|
}
|
|
|
|
|
|
|
|
&dataseg();
|
|
|
|
&align(4);
|
|
|
|
&set_label("OPENSSL_UplinkTable");
|
|
|
|
&data_word($N);
|
|
|
|
for ($i=1;$i<=$N;$i++) {
|
|
|
|
&data_word(&label("_\$lazy${i}"));
|
|
|
|
}
|
|
|
|
&asm_finish();
|
2016-03-07 22:00:45 +08:00
|
|
|
|
|
|
|
close OUTPUT;
|