Artifact
461d068ac6a66c9c06e99478c0a6e2954bbaffd6:
0000: 3b 20 54 72 61 6d 70 6f 6c 69 6e 65 20 66 6f 72 ; Trampoline for
0010: 20 68 70 70 61 20 43 50 55 0a 0a 3b 20 43 6f 70 hppa CPU..; Cop
0020: 79 72 69 67 68 74 20 31 39 39 35 2d 31 39 39 37 yright 1995-1997
0030: 20 42 72 75 6e 6f 20 48 61 69 62 6c 65 2c 20 3c Bruno Haible, <
0040: 62 72 75 6e 6f 40 63 6c 69 73 70 2e 6f 72 67 3e bruno@clisp.org>
0050: 0a 3b 0a 3b 20 54 68 69 73 20 69 73 20 66 72 65 .;.; This is fre
0060: 65 20 73 6f 66 74 77 61 72 65 20 64 69 73 74 72 e software distr
0070: 69 62 75 74 65 64 20 75 6e 64 65 72 20 74 68 65 ibuted under the
0080: 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 GNU General Pub
0090: 6c 69 63 20 4c 69 63 65 6e 63 65 0a 3b 20 64 65 lic Licence.; de
00a0: 73 63 72 69 62 65 64 20 69 6e 20 74 68 65 20 66 scribed in the f
00b0: 69 6c 65 20 43 4f 50 59 49 4e 47 2e 20 43 6f 6e ile COPYING. Con
00c0: 74 61 63 74 20 74 68 65 20 61 75 74 68 6f 72 20 tact the author
00d0: 69 66 20 79 6f 75 20 64 6f 6e 27 74 20 68 61 76 if you don't hav
00e0: 65 20 74 68 69 73 0a 3b 20 6f 72 20 63 61 6e 27 e this.; or can'
00f0: 74 20 6c 69 76 65 20 77 69 74 68 20 69 74 2e 20 t live with it.
0100: 54 68 65 72 65 20 69 73 20 41 42 53 4f 4c 55 54 There is ABSOLUT
0110: 45 4c 59 20 4e 4f 20 57 41 52 52 41 4e 54 59 2c ELY NO WARRANTY,
0120: 20 65 78 70 6c 69 63 69 74 20 6f 72 20 69 6d 70 explicit or imp
0130: 6c 69 65 64 2c 0a 3b 20 6f 6e 20 74 68 69 73 20 lied,.; on this
0140: 73 6f 66 74 77 61 72 65 2e 0a 0a 3b 20 41 76 61 software...; Ava
0150: 69 6c 61 62 6c 65 20 72 65 67 69 73 74 65 72 73 ilable registers
0160: 3a 20 25 72 31 39 2c 20 25 72 32 30 2c 20 25 72 : %r19, %r20, %r
0170: 32 31 2c 20 25 72 32 32 2e 0a 0a 09 2e 53 50 41 21, %r22.....SPA
0180: 43 45 20 24 50 52 49 56 41 54 45 24 0a 09 2e 53 CE $PRIVATE$...S
0190: 55 42 53 50 41 20 24 44 41 54 41 24 2c 51 55 41 UBSPA $DATA$,QUA
01a0: 44 3d 31 2c 41 4c 49 47 4e 3d 38 2c 41 43 43 45 D=1,ALIGN=8,ACCE
01b0: 53 53 3d 33 31 0a 09 2e 53 55 42 53 50 41 20 24 SS=31...SUBSPA $
01c0: 42 53 53 24 2c 51 55 41 44 3d 31 2c 41 4c 49 47 BSS$,QUAD=1,ALIG
01d0: 4e 3d 38 2c 41 43 43 45 53 53 3d 33 31 2c 5a 45 N=8,ACCESS=31,ZE
01e0: 52 4f 2c 53 4f 52 54 3d 38 32 0a 09 2e 53 50 41 RO,SORT=82...SPA
01f0: 43 45 20 24 54 45 58 54 24 0a 09 2e 53 55 42 53 CE $TEXT$...SUBS
0200: 50 41 20 24 4c 49 54 24 2c 51 55 41 44 3d 30 2c PA $LIT$,QUAD=0,
0210: 41 4c 49 47 4e 3d 38 2c 41 43 43 45 53 53 3d 34 ALIGN=8,ACCESS=4
0220: 34 0a 09 2e 53 55 42 53 50 41 20 24 43 4f 44 45 4...SUBSPA $CODE
0230: 24 2c 51 55 41 44 3d 30 2c 41 4c 49 47 4e 3d 38 $,QUAD=0,ALIGN=8
0240: 2c 41 43 43 45 53 53 3d 34 34 2c 43 4f 44 45 5f ,ACCESS=44,CODE_
0250: 4f 4e 4c 59 0a 0a 09 2e 53 50 41 43 45 20 24 54 ONLY....SPACE $T
0260: 45 58 54 24 0a 09 2e 53 55 42 53 50 41 20 24 43 EXT$...SUBSPA $C
0270: 4f 44 45 24 0a 0a 09 2e 61 6c 69 67 6e 20 34 0a ODE$....align 4.
0280: 09 2e 45 58 50 4f 52 54 20 74 72 61 6d 70 0a 74 ..EXPORT tramp.t
0290: 72 61 6d 70 0a 09 2e 50 52 4f 43 0a 09 2e 43 41 ramp...PROC...CA
02a0: 4c 4c 49 4e 46 4f 0a 09 2e 45 4e 54 52 59 0a 3b LLINFO...ENTRY.;
02b0: 20 4d 6f 76 65 20 3c 64 61 74 61 3e 20 69 6e 74 Move <data> int
02c0: 6f 20 3c 76 61 72 69 61 62 6c 65 3e 0a 09 6c 64 o <variable>..ld
02d0: 69 6c 20 4c 27 30 78 37 33 35 35 34 37 31 31 2c il L'0x73554711,
02e0: 25 72 32 39 0a 09 6c 64 6f 20 52 27 30 78 37 33 %r29..ldo R'0x73
02f0: 35 35 34 37 31 31 28 25 72 32 39 29 2c 25 72 32 554711(%r29),%r2
0300: 39 0a 3b 20 47 65 74 20 3c 66 75 6e 63 74 69 6f 9.; Get <functio
0310: 6e 3e 0a 09 6c 64 69 6c 20 4c 27 30 78 62 61 62 n>..ldil L'0xbab
0320: 65 62 65 63 30 2c 25 72 32 31 0a 09 6c 64 6f 20 ebec0,%r21..ldo
0330: 52 27 30 78 62 61 62 65 62 65 63 30 28 25 72 32 R'0xbabebec0(%r2
0340: 31 29 2c 25 72 32 31 0a 3b 20 4a 75 6d 70 20 74 1),%r21.; Jump t
0350: 6f 20 25 72 32 31 2c 20 6a 75 73 74 20 6c 69 6b o %r21, just lik
0360: 65 20 74 68 65 20 67 63 63 2d 32 2e 36 2e 33 20 e the gcc-2.6.3
0370: 74 72 61 6d 70 6f 6c 69 6e 65 20 64 6f 65 73 20 trampoline does
0380: 69 74 3a 0a 09 62 62 2c 3e 3d 2c 6e 20 25 72 32 it:..bb,>=,n %r2
0390: 31 2c 33 30 2c 74 72 61 6d 70 32 09 3b 20 63 68 1,30,tramp2.; ch
03a0: 65 63 6b 20 62 69 74 20 31 20 6f 66 20 25 72 32 eck bit 1 of %r2
03b0: 31 0a 09 64 65 70 69 20 30 2c 33 31 2c 32 2c 25 1..depi 0,31,2,%
03c0: 72 32 31 09 3b 20 69 66 20 73 65 74 2c 20 63 6c r21.; if set, cl
03d0: 65 61 72 20 62 69 74 73 20 31 2e 2e 30 0a 09 6c ear bits 1..0..l
03e0: 64 77 20 34 28 30 2c 25 72 32 31 29 2c 25 72 31 dw 4(0,%r21),%r1
03f0: 39 09 3b 20 2e 2e 2e 20 64 65 72 65 66 65 72 65 9.; ... derefere
0400: 6e 63 65 20 74 68 65 20 66 75 6e 63 74 69 6f 6e nce the function
0410: 20 73 74 72 75 63 74 0a 09 6c 64 77 20 30 28 30 struct..ldw 0(0
0420: 2c 25 72 32 31 29 2c 25 72 32 31 09 3b 20 2e 2e ,%r21),%r21.; ..
0430: 2e 20 74 6f 20 67 65 74 20 74 68 65 20 61 63 74 . to get the act
0440: 75 61 6c 20 63 6f 64 65 20 61 64 64 72 65 73 73 ual code address
0450: 0a 74 72 61 6d 70 32 0a 09 6c 64 73 69 64 20 28 .tramp2..ldsid (
0460: 30 2c 25 72 32 31 29 2c 25 72 31 0a 09 6d 74 73 0,%r21),%r1..mts
0470: 70 20 25 72 31 2c 25 73 72 30 09 09 3b 20 73 65 p %r1,%sr0..; se
0480: 74 20 73 65 67 6d 65 6e 74 20 72 65 67 69 73 74 t segment regist
0490: 65 72 0a 09 62 65 2c 6e 20 30 28 25 73 72 30 2c er..be,n 0(%sr0,
04a0: 25 72 32 31 29 09 3b 20 6e 6f 77 20 64 6f 20 61 %r21).; now do a
04b0: 6e 20 69 6e 74 65 72 2d 6d 6f 64 75 6c 65 20 6a n inter-module j
04c0: 75 6d 70 0a 09 6e 6f 70 0a 09 2e 45 58 49 54 0a ump..nop...EXIT.
04d0: 09 2e 50 52 4f 43 45 4e 44 0a ..PROCEND.