Artifact
df54453b7bdbee8ba22e6a656489f85ded9f0632:
0000: 2f 2a 20 54 72 61 6d 70 6f 6c 69 6e 65 20 66 6f /* Trampoline fo
0010: 72 20 6d 69 70 73 20 43 50 55 20 69 6e 20 36 34 r mips CPU in 64
0020: 2d 62 69 74 20 6d 6f 64 65 20 2a 2f 0a 0a 2f 2a -bit mode */../*
0030: 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 20 31 39 . * Copyright 19
0040: 39 36 20 42 72 75 6e 6f 20 48 61 69 62 6c 65 2c 96 Bruno Haible,
0050: 20 3c 62 72 75 6e 6f 40 63 6c 69 73 70 2e 6f 72 <bruno@clisp.or
0060: 67 3e 0a 20 2a 0a 20 2a 20 54 68 69 73 20 69 73 g>. *. * This is
0070: 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 20 64 free software d
0080: 69 73 74 72 69 62 75 74 65 64 20 75 6e 64 65 72 istributed under
0090: 20 74 68 65 20 47 4e 55 20 47 65 6e 65 72 61 6c the GNU General
00a0: 20 50 75 62 6c 69 63 20 4c 69 63 65 6e 63 65 0a Public Licence.
00b0: 20 2a 20 64 65 73 63 72 69 62 65 64 20 69 6e 20 * described in
00c0: 74 68 65 20 66 69 6c 65 20 43 4f 50 59 49 4e 47 the file COPYING
00d0: 2e 20 43 6f 6e 74 61 63 74 20 74 68 65 20 61 75 . Contact the au
00e0: 74 68 6f 72 20 69 66 20 79 6f 75 20 64 6f 6e 27 thor if you don'
00f0: 74 20 68 61 76 65 20 74 68 69 73 0a 20 2a 20 6f t have this. * o
0100: 72 20 63 61 6e 27 74 20 6c 69 76 65 20 77 69 74 r can't live wit
0110: 68 20 69 74 2e 20 54 68 65 72 65 20 69 73 20 41 h it. There is A
0120: 42 53 4f 4c 55 54 45 4c 59 20 4e 4f 20 57 41 52 BSOLUTELY NO WAR
0130: 52 41 4e 54 59 2c 20 65 78 70 6c 69 63 69 74 20 RANTY, explicit
0140: 6f 72 20 69 6d 70 6c 69 65 64 2c 0a 20 2a 20 6f or implied,. * o
0150: 6e 20 74 68 69 73 20 73 6f 66 74 77 61 72 65 2e n this software.
0160: 0a 20 2a 2f 0a 0a 2f 2a 20 41 76 61 69 6c 61 62 . */../* Availab
0170: 6c 65 20 72 65 67 69 73 74 65 72 73 3a 20 24 32 le registers: $2
0180: 2c 20 24 33 2e 20 2a 2f 0a 0a 09 2e 73 65 74 09 , $3. */....set.
0190: 6e 6f 62 6f 70 74 0a 09 2e 73 65 74 09 6e 6f 72 nobopt...set.nor
01a0: 65 6f 72 64 65 72 0a 09 2e 74 65 78 74 0a 09 2e eorder...text...
01b0: 67 6c 6f 62 6c 09 6d 61 69 6e 0a 09 2e 65 6e 74 globl.main...ent
01c0: 09 6d 61 69 6e 0a 6d 61 69 6e 3a 0a 09 2e 65 6e .main.main:...en
01d0: 64 09 6d 61 69 6e 0a 09 2e 67 6c 6f 62 6c 09 74 d.main...globl.t
01e0: 72 61 6d 70 0a 09 2e 65 6e 74 09 74 72 61 6d 70 ramp...ent.tramp
01f0: 0a 74 72 61 6d 70 3a 0a 09 2f 2a 20 57 65 20 63 .tramp:../* We c
0200: 61 6e 20 61 73 73 75 6d 65 20 74 68 61 74 20 6f an assume that o
0210: 75 72 20 6f 77 6e 20 61 64 64 72 65 73 73 20 28 ur own address (
0220: 3d 74 72 61 6d 70 29 20 69 73 20 69 6e 20 24 32 =tramp) is in $2
0230: 35 2e 20 2a 2f 0a 09 6c 64 09 24 32 2c 24 4c 43 5. */..ld.$2,$LC
0240: 30 2d 74 72 61 6d 70 28 24 32 35 29 0a 09 6c 64 0-tramp($25)..ld
0250: 09 24 33 2c 24 4c 43 31 2d 74 72 61 6d 70 28 24 .$3,$LC1-tramp($
0260: 32 35 29 0a 09 73 64 09 24 33 2c 30 28 24 32 29 25)..sd.$3,0($2)
0270: 0a 09 6c 64 09 24 32 35 2c 24 4c 43 32 2d 74 72 ..ld.$25,$LC2-tr
0280: 61 6d 70 28 24 32 35 29 0a 09 2f 2a 20 54 68 65 amp($25)../* The
0290: 20 63 61 6c 6c 65 64 20 66 75 6e 63 74 69 6f 6e called function
02a0: 20 65 78 70 65 63 74 73 20 74 6f 20 73 65 65 20 expects to see
02b0: 69 74 73 20 6f 77 6e 20 61 64 64 72 65 73 73 20 its own address
02c0: 69 6e 20 24 32 35 2e 20 2a 2f 0a 09 6a 09 24 32 in $25. */..j.$2
02d0: 35 0a 09 2f 2a 20 53 6f 6d 65 20 4d 69 70 73 20 5../* Some Mips
02e0: 68 61 72 64 77 61 72 65 20 72 75 6e 6e 69 6e 67 hardware running
02f0: 20 49 72 69 78 2d 34 2e 30 2e 35 20 6e 65 65 64 Irix-4.0.5 need
0300: 73 20 74 68 69 73 20 6e 6f 70 2e 20 2a 2f 0a 09 s this nop. */..
0310: 6e 6f 70 0a 24 4c 43 30 3a 0a 09 2e 64 77 6f 72 nop.$LC0:...dwor
0320: 64 09 30 78 31 32 33 34 35 36 37 38 31 33 35 37 d.0x123456781357
0330: 38 37 36 35 0a 24 4c 43 31 3a 0a 09 2e 64 77 6f 8765.$LC1:...dwo
0340: 72 64 09 30 78 37 33 35 35 34 37 31 31 34 33 36 rd.0x73554711436
0350: 32 32 31 35 35 0a 24 4c 43 32 3a 0a 09 2e 64 77 22155.$LC2:...dw
0360: 6f 72 64 09 30 78 62 61 62 65 62 65 63 30 64 65 ord.0xbabebec0de
0370: 61 30 66 66 61 62 0a 09 2e 65 6e 64 09 74 72 61 a0ffab...end.tra
0380: 6d 70 0a mp.