2 # Copyright 2008-2024 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
9 # $output is the last argument if it looks like a file (it has an extension)
10 $output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
11 $flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
13 $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
14 open OUT,"| \"$^X\" \"${dir}../crypto/perlasm/x86_64-xlate.pl\" $flavour \"$output\""
15 or die "can't call ${dir}../crypto/perlasm/x86_64-xlate.pl: $!";
19 require "uplink-common.pl";
25 .extern OPENSSL_Uplink
26 .globl OPENSSL_UplinkTable
28 for ($i=1;$i<=$N;$i++) {
30 .type $prefix${i},\@abi-omnipotent
33 .byte 0x48,0x83,0xEC,0x28 # sub rsp,40
38 lea OPENSSL_UplinkTable(%rip),%rcx
45 lea OPENSSL_UplinkTable(%rip),%rax
49 .size $prefix${i},.-$prefix${i}
57 for ($i=1;$i<=$N;$i++) { print " .quad $prefix$i\n"; }
62 for ($i=1;$i<=$N;$i++) {
64 .rva $prefix${i},$prefix${i}_end,${prefix}_unwind_info
70 ${prefix}_unwind_info:
71 .byte 0x01,0x04,0x01,0x00
72 .byte 0x04,0x42,0x00,0x00