root / target-mips / op_template.c @ 1247c5f7
History | View | Annotate | Download (1.4 kB)
1 | 6af0bf9c | bellard | /*
|
---|---|---|---|
2 | 6af0bf9c | bellard | * MIPS emulation micro-operations templates for reg load & store for qemu.
|
3 | 6af0bf9c | bellard | *
|
4 | 6af0bf9c | bellard | * Copyright (c) 2004-2005 Jocelyn Mayer
|
5 | 6af0bf9c | bellard | *
|
6 | 6af0bf9c | bellard | * This library is free software; you can redistribute it and/or
|
7 | 6af0bf9c | bellard | * modify it under the terms of the GNU Lesser General Public
|
8 | 6af0bf9c | bellard | * License as published by the Free Software Foundation; either
|
9 | 6af0bf9c | bellard | * version 2 of the License, or (at your option) any later version.
|
10 | 6af0bf9c | bellard | *
|
11 | 6af0bf9c | bellard | * This library is distributed in the hope that it will be useful,
|
12 | 6af0bf9c | bellard | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 6af0bf9c | bellard | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 | 6af0bf9c | bellard | * Lesser General Public License for more details.
|
15 | 6af0bf9c | bellard | *
|
16 | 6af0bf9c | bellard | * You should have received a copy of the GNU Lesser General Public
|
17 | 6af0bf9c | bellard | * License along with this library; if not, write to the Free Software
|
18 | 6af0bf9c | bellard | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19 | 6af0bf9c | bellard | */
|
20 | 6af0bf9c | bellard | |
21 | 6af0bf9c | bellard | #if defined(REG)
|
22 | 6af0bf9c | bellard | void glue(op_load_gpr_T0_gpr, REG) (void) |
23 | 6af0bf9c | bellard | { |
24 | 6af0bf9c | bellard | T0 = env->gpr[REG]; |
25 | 6af0bf9c | bellard | RETURN(); |
26 | 6af0bf9c | bellard | } |
27 | 6af0bf9c | bellard | |
28 | 6af0bf9c | bellard | void glue(op_store_T0_gpr_gpr, REG) (void) |
29 | 6af0bf9c | bellard | { |
30 | 6af0bf9c | bellard | env->gpr[REG] = T0; |
31 | 6af0bf9c | bellard | RETURN(); |
32 | 6af0bf9c | bellard | } |
33 | 6af0bf9c | bellard | |
34 | 6af0bf9c | bellard | void glue(op_load_gpr_T1_gpr, REG) (void) |
35 | 6af0bf9c | bellard | { |
36 | 6af0bf9c | bellard | T1 = env->gpr[REG]; |
37 | 6af0bf9c | bellard | RETURN(); |
38 | 6af0bf9c | bellard | } |
39 | 6af0bf9c | bellard | |
40 | 6af0bf9c | bellard | void glue(op_store_T1_gpr_gpr, REG) (void) |
41 | 6af0bf9c | bellard | { |
42 | 6af0bf9c | bellard | env->gpr[REG] = T1; |
43 | 6af0bf9c | bellard | RETURN(); |
44 | 6af0bf9c | bellard | } |
45 | 6af0bf9c | bellard | |
46 | 6af0bf9c | bellard | void glue(op_load_gpr_T2_gpr, REG) (void) |
47 | 6af0bf9c | bellard | { |
48 | 6af0bf9c | bellard | T2 = env->gpr[REG]; |
49 | 6af0bf9c | bellard | RETURN(); |
50 | 6af0bf9c | bellard | } |
51 | 6af0bf9c | bellard | #endif
|
52 | 6af0bf9c | bellard | |
53 | 6af0bf9c | bellard | #if defined (TN)
|
54 | 6af0bf9c | bellard | void glue(op_set_, TN) (void) |
55 | 6af0bf9c | bellard | { |
56 | 6af0bf9c | bellard | TN = PARAM1; |
57 | 6af0bf9c | bellard | RETURN(); |
58 | 6af0bf9c | bellard | } |
59 | 6af0bf9c | bellard | |
60 | 6af0bf9c | bellard | void glue (op_reset_, TN) (void) |
61 | 6af0bf9c | bellard | { |
62 | 6af0bf9c | bellard | TN = 0;
|
63 | 6af0bf9c | bellard | RETURN(); |
64 | 6af0bf9c | bellard | } |
65 | 6af0bf9c | bellard | #endif |