~ubuntu-branches/debian/squeeze/ffcall/squeeze

« back to all changes in this revision

Viewing changes to ffcall/trampoline/tramp-mipsn32.s

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2010-06-26 15:29:30 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100626152930-c09y01gk3szcnykn
Tags: 1.10+cvs20100619-2
Ship to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Trampoline for mips CPU */
2
 
 
3
 
/*
4
 
 * Copyright 1996-1998 Bruno Haible, <bruno@clisp.org>
5
 
 *
6
 
 * This is free software distributed under the GNU General Public Licence
7
 
 * described in the file COPYING. Contact the author if you don't have this
8
 
 * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
9
 
 * on this software.
10
 
 */
11
 
 
12
 
/* Available registers: $2, $3. */
13
 
 
14
 
        .set    nobopt
15
 
        .set    noreorder
16
 
        .text
17
 
        .globl  main
18
 
        .ent    main
19
 
main:
20
 
        .end    main
21
 
        .globl  tramp
22
 
        .ent    tramp
23
 
tramp:
24
 
        /* We can assume that our own address (=tramp) is in $25. */
25
 
        lw      $2,24($25)
26
 
        lw      $3,28($25)
27
 
        sw      $3,0($2)
28
 
        lw      $25,32($25)
29
 
        /* The called function expects to see its own address in $25. */
30
 
        j       $25
31
 
        /* Some Mips hardware running Irix-4.0.5 needs this nop. */
32
 
        nop
33
 
        /* We'll actually store the data words immediately after the code. */
34
 
        /* The assembler just doesn't like ".word" inside section .text. */
35
 
        .data
36
 
$LC0:
37
 
        .word   0x12345678
38
 
$LC1:
39
 
        .word   0x73554711
40
 
$LC2:
41
 
        .word   0xbabebec0
42
 
        .end    tramp