Artifact
59157119ff1b67e4ddfee2e0d79952a24af0e3fe:
0000: 2f 2a 20 54 72 61 6d 70 6f 6c 69 6e 65 20 66 6f /* Trampoline fo
0010: 72 20 72 73 36 30 30 30 20 43 50 55 20 77 69 74 r rs6000 CPU wit
0020: 68 20 53 79 73 56 2e 34 20 41 42 49 20 2a 2f 0a h SysV.4 ABI */.
0030: 0a 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 ./*. * Copyright
0040: 20 31 39 39 35 2d 31 39 39 39 20 42 72 75 6e 6f 1995-1999 Bruno
0050: 20 48 61 69 62 6c 65 2c 20 3c 62 72 75 6e 6f 40 Haible, <bruno@
0060: 63 6c 69 73 70 2e 6f 72 67 3e 0a 20 2a 0a 20 2a clisp.org>. *. *
0070: 20 54 68 69 73 20 69 73 20 66 72 65 65 20 73 6f This is free so
0080: 66 74 77 61 72 65 20 64 69 73 74 72 69 62 75 74 ftware distribut
0090: 65 64 20 75 6e 64 65 72 20 74 68 65 20 47 4e 55 ed under the GNU
00a0: 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 General Public
00b0: 4c 69 63 65 6e 63 65 0a 20 2a 20 64 65 73 63 72 Licence. * descr
00c0: 69 62 65 64 20 69 6e 20 74 68 65 20 66 69 6c 65 ibed in the file
00d0: 20 43 4f 50 59 49 4e 47 2e 20 43 6f 6e 74 61 63 COPYING. Contac
00e0: 74 20 74 68 65 20 61 75 74 68 6f 72 20 69 66 20 t the author if
00f0: 79 6f 75 20 64 6f 6e 27 74 20 68 61 76 65 20 74 you don't have t
0100: 68 69 73 0a 20 2a 20 6f 72 20 63 61 6e 27 74 20 his. * or can't
0110: 6c 69 76 65 20 77 69 74 68 20 69 74 2e 20 54 68 live with it. Th
0120: 65 72 65 20 69 73 20 41 42 53 4f 4c 55 54 45 4c ere is ABSOLUTEL
0130: 59 20 4e 4f 20 57 41 52 52 41 4e 54 59 2c 20 65 Y NO WARRANTY, e
0140: 78 70 6c 69 63 69 74 20 6f 72 20 69 6d 70 6c 69 xplicit or impli
0150: 65 64 2c 0a 20 2a 20 6f 6e 20 74 68 69 73 20 73 ed,. * on this s
0160: 6f 66 74 77 61 72 65 2e 0a 20 2a 2f 0a 0a 2f 2a oftware.. */../*
0170: 20 41 76 61 69 6c 61 62 6c 65 20 72 65 67 69 73 Available regis
0180: 74 65 72 73 3a 20 72 30 2c 20 72 31 32 2c 20 72 ters: r0, r12, r
0190: 31 31 2c 20 72 31 30 2c 20 72 39 2c 20 72 38 2c 11, r10, r9, r8,
01a0: 20 72 37 2c 20 72 36 2c 20 72 35 2c 20 72 34 2c r7, r6, r5, r4,
01b0: 20 72 33 2e 20 2a 2f 0a 2f 2a 20 48 6f 77 65 76 r3. */./* Howev
01c0: 65 72 2c 20 72 30 20 69 73 20 73 70 65 63 69 61 er, r0 is specia
01d0: 6c 20 69 6e 20 74 68 61 74 20 69 74 20 63 61 6e l in that it can
01e0: 6e 6f 74 20 62 65 20 75 73 65 64 20 61 73 20 61 not be used as a
01f0: 20 62 61 73 65 20 72 65 67 69 73 74 65 72 2e 20 base register.
0200: 2a 2f 0a 2f 2a 20 41 6e 64 20 72 33 2e 2e 2e 72 */./* And r3...r
0210: 31 30 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 10 should not be
0220: 20 63 6c 6f 62 62 65 72 65 64 20 62 65 63 61 75 clobbered becau
0230: 73 65 20 74 68 65 79 20 63 6f 6e 74 61 69 6e 20 se they contain
0240: 74 68 65 20 66 69 72 73 74 20 38 0a 20 2a 20 69 the first 8. * i
0250: 6e 74 65 67 65 72 20 61 72 67 75 6d 65 6e 74 73 nteger arguments
0260: 20 74 6f 20 74 68 65 20 66 75 6e 63 74 69 6f 6e to the function
0270: 20 62 65 69 6e 67 20 63 61 6c 6c 65 64 2e 20 2a being called. *
0280: 2f 0a 0a 09 2e 67 6c 6f 62 6c 20 74 72 61 6d 70 /....globl tramp
0290: 0a 74 72 61 6d 70 3a 0a 2f 2a 20 4d 6f 76 65 20 .tramp:./* Move
02a0: 3c 64 61 74 61 3e 20 69 6e 74 6f 20 3c 76 61 72 <data> into <var
02b0: 69 61 62 6c 65 3e 20 2a 2f 0a 09 6c 69 73 20 31 iable> */..lis 1
02c0: 31 2c 30 78 31 32 33 34 0a 09 6f 72 69 20 31 31 1,0x1234..ori 11
02d0: 2c 31 31 2c 30 78 35 36 37 38 0a 09 6c 69 73 20 ,11,0x5678..lis
02e0: 31 32 2c 30 78 37 33 35 35 0a 09 6f 72 69 20 31 12,0x7355..ori 1
02f0: 32 2c 31 32 2c 30 78 34 37 31 31 0a 09 73 74 77 2,12,0x4711..stw
0300: 20 31 32 2c 30 28 31 31 29 0a 2f 2a 20 47 65 74 12,0(11)./* Get
0310: 20 3c 66 75 6e 63 74 69 6f 6e 3e 20 2a 2f 0a 09 <function> */..
0320: 6c 69 73 20 30 2c 30 78 62 61 62 65 0a 09 6f 72 lis 0,0xbabe..or
0330: 69 20 30 2c 30 2c 30 78 62 65 63 30 0a 09 6d 74 i 0,0,0xbec0..mt
0340: 63 74 72 20 30 0a 09 62 63 74 72 0a ctr 0..bctr.