xref: /minix3/crypto/external/bsd/openssl/dist/ms/uplink-ia64.pl (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc#!/usr/bin/env perl
2*ebfedea0SLionel Sambuc
3*ebfedea0SLionel Sambuc$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
4*ebfedea0SLionel Sambucpush(@INC,"${dir}.");
5*ebfedea0SLionel Sambuc
6*ebfedea0SLionel Sambucrequire "uplink-common.pl";
7*ebfedea0SLionel Sambuc
8*ebfedea0SLionel Sambuclocal $V=8;	# max number of args uplink functions may accept...
9*ebfedea0SLionel Sambucmy $loc0 = "r".(32+$V);
10*ebfedea0SLionel Sambucprint <<___;
11*ebfedea0SLionel Sambuc.text
12*ebfedea0SLionel Sambuc.global	OPENSSL_Uplink#
13*ebfedea0SLionel Sambuc.type	OPENSSL_Uplink#,\@function
14*ebfedea0SLionel Sambuc
15*ebfedea0SLionel Sambuc___
16*ebfedea0SLionel Sambucfor ($i=1;$i<=$N;$i++) {
17*ebfedea0SLionel Sambucprint <<___;
18*ebfedea0SLionel Sambuc.proc	lazy$i#
19*ebfedea0SLionel Sambuclazy$i:
20*ebfedea0SLionel Sambuc	.prologue
21*ebfedea0SLionel Sambuc{ .mii;	.save	ar.pfs,$loc0
22*ebfedea0SLionel Sambuc	alloc	loc0=ar.pfs,$V,3,2,0
23*ebfedea0SLionel Sambuc	.save	b0,loc1
24*ebfedea0SLionel Sambuc	mov	loc1=b0
25*ebfedea0SLionel Sambuc	addl	loc2=\@ltoff(OPENSSL_UplinkTable#),gp	};;
26*ebfedea0SLionel Sambuc	.body
27*ebfedea0SLionel Sambuc{ .mmi;	ld8	out0=[loc2]
28*ebfedea0SLionel Sambuc	mov	out1=$i					};;
29*ebfedea0SLionel Sambuc{ .mib;	add	loc2=8*$i,out0
30*ebfedea0SLionel Sambuc	br.call.sptk.many	b0=OPENSSL_Uplink#	};;
31*ebfedea0SLionel Sambuc{ .mmi;	ld8	r31=[loc2];;
32*ebfedea0SLionel Sambuc	ld8	r30=[r31],8				};;
33*ebfedea0SLionel Sambuc{ .mii;	ld8	gp=[r31]
34*ebfedea0SLionel Sambuc	mov	b6=r30
35*ebfedea0SLionel Sambuc	mov	b0=loc1					};;
36*ebfedea0SLionel Sambuc{ .mib;	mov	ar.pfs=loc0
37*ebfedea0SLionel Sambuc	br.many	b6					};;
38*ebfedea0SLionel Sambuc.endp	lazy$i#
39*ebfedea0SLionel Sambuc
40*ebfedea0SLionel Sambuc___
41*ebfedea0SLionel Sambuc}
42*ebfedea0SLionel Sambucprint <<___;
43*ebfedea0SLionel Sambuc.data
44*ebfedea0SLionel Sambuc.global OPENSSL_UplinkTable#
45*ebfedea0SLionel SambucOPENSSL_UplinkTable:    data8   $N      // amount of following entries
46*ebfedea0SLionel Sambuc___
47*ebfedea0SLionel Sambucfor ($i=1;$i<=$N;$i++) {   print "      data8   \@fptr(lazy$i#)\n";   }
48*ebfedea0SLionel Sambucprint <<___;
49*ebfedea0SLionel Sambuc.size   OPENSSL_UplinkTable,.-OPENSSL_UplinkTable#
50*ebfedea0SLionel Sambuc___
51