Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | jermar | 1 | /* |
2 | * Copyright (C) 2001-2004 Jakub Jermar |
||
3 | * All rights reserved. |
||
4 | * |
||
5 | * Redistribution and use in source and binary forms, with or without |
||
6 | * modification, are permitted provided that the following conditions |
||
7 | * are met: |
||
8 | * |
||
9 | * - Redistributions of source code must retain the above copyright |
||
10 | * notice, this list of conditions and the following disclaimer. |
||
11 | * - Redistributions in binary form must reproduce the above copyright |
||
12 | * notice, this list of conditions and the following disclaimer in the |
||
13 | * documentation and/or other materials provided with the distribution. |
||
14 | * - The name of the author may not be used to endorse or promote products |
||
15 | * derived from this software without specific prior written permission. |
||
16 | * |
||
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
||
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
||
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
||
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
||
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
||
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||
27 | */ |
||
28 | |||
29 | /* |
||
30 | * MIPS assembler macros |
||
31 | */ |
||
32 | |||
33 | .macro REGISTERS_STORE r |
||
34 | sw $0,0(\r) |
||
35 | sw $1,4(\r) |
||
36 | sw $2,8(\r) # meaningless |
||
37 | sw $3,12(\r) |
||
38 | sw $4,16(\r) |
||
39 | sw $5,20(\r) |
||
40 | sw $6,24(\r) |
||
41 | sw $7,28(\r) |
||
42 | sw $8,32(\r) |
||
43 | sw $9,36(\r) |
||
44 | sw $10,40(\r) |
||
45 | sw $11,44(\r) |
||
46 | sw $12,48(\r) |
||
47 | sw $13,52(\r) |
||
48 | sw $14,56(\r) |
||
49 | sw $15,60(\r) |
||
50 | sw $16,64(\r) |
||
51 | sw $17,68(\r) |
||
52 | sw $18,72(\r) |
||
53 | sw $19,76(\r) |
||
54 | sw $20,80(\r) |
||
55 | sw $21,84(\r) |
||
56 | sw $22,88(\r) |
||
57 | sw $23,92(\r) |
||
58 | sw $24,96(\r) |
||
59 | sw $25,100(\r) |
||
60 | sw $26,104(\r) |
||
61 | sw $27,108(\r) |
||
62 | sw $28,112(\r) |
||
63 | sw $29,116(\r) |
||
64 | sw $30,120(\r) |
||
65 | sw $31,124(\r) |
||
66 | .endm |
||
67 | |||
68 | .macro REGISTERS_LOAD r |
||
69 | lw $0,0(\r) |
||
70 | lw $1,4(\r) |
||
71 | lw $2,8(\r) # meaningless |
||
72 | lw $3,12(\r) |
||
73 | lw $4,16(\r) # this is ok, $4 == 16(\r) |
||
74 | lw $5,20(\r) |
||
75 | lw $6,24(\r) |
||
76 | lw $7,28(\r) |
||
77 | lw $8,32(\r) |
||
78 | lw $9,36(\r) |
||
79 | lw $10,40(\r) |
||
80 | lw $11,44(\r) |
||
81 | lw $12,48(\r) |
||
82 | lw $13,52(\r) |
||
83 | lw $14,56(\r) |
||
84 | lw $15,60(\r) |
||
85 | lw $16,64(\r) |
||
86 | lw $17,68(\r) |
||
87 | lw $18,72(\r) |
||
88 | lw $19,76(\r) |
||
89 | lw $20,80(\r) |
||
90 | lw $21,84(\r) |
||
91 | lw $22,88(\r) |
||
92 | lw $23,92(\r) |
||
93 | lw $24,96(\r) |
||
94 | lw $25,100(\r) |
||
95 | lw $26,104(\r) |
||
96 | lw $27,108(\r) |
||
97 | lw $28,112(\r) |
||
98 | lw $29,116(\r) |
||
99 | lw $30,120(\r) |
||
100 | lw $31,124(\r) |
||
101 | .endm |