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