root / target-cris / op_template.h @ f97572e5
History | View | Annotate | Download (1.2 kB)
1 | 81fdc5f8 | ths | /*
|
---|---|---|---|
2 | 81fdc5f8 | ths | * CRIS micro operations (templates for various register related
|
3 | 81fdc5f8 | ths | * operations)
|
4 | 81fdc5f8 | ths | *
|
5 | 81fdc5f8 | ths | * Copyright (c) 2003 Fabrice Bellard
|
6 | 81fdc5f8 | ths | *
|
7 | 81fdc5f8 | ths | * This library is free software; you can redistribute it and/or
|
8 | 81fdc5f8 | ths | * modify it under the terms of the GNU Lesser General Public
|
9 | 81fdc5f8 | ths | * License as published by the Free Software Foundation; either
|
10 | 81fdc5f8 | ths | * version 2 of the License, or (at your option) any later version.
|
11 | 81fdc5f8 | ths | *
|
12 | 81fdc5f8 | ths | * This library is distributed in the hope that it will be useful,
|
13 | 81fdc5f8 | ths | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 | 81fdc5f8 | ths | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15 | 81fdc5f8 | ths | * Lesser General Public License for more details.
|
16 | 81fdc5f8 | ths | *
|
17 | 81fdc5f8 | ths | * You should have received a copy of the GNU Lesser General Public
|
18 | 81fdc5f8 | ths | * License along with this library; if not, write to the Free Software
|
19 | 81fdc5f8 | ths | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
20 | 81fdc5f8 | ths | */
|
21 | 81fdc5f8 | ths | |
22 | 81fdc5f8 | ths | #ifndef SET_REG
|
23 | 81fdc5f8 | ths | #define SET_REG(x) REG = x
|
24 | 81fdc5f8 | ths | #endif
|
25 | 81fdc5f8 | ths | |
26 | 81fdc5f8 | ths | void OPPROTO glue(op_movl_T0_, REGNAME)(void) |
27 | 81fdc5f8 | ths | { |
28 | 81fdc5f8 | ths | T0 = REG; |
29 | 81fdc5f8 | ths | } |
30 | 81fdc5f8 | ths | |
31 | 81fdc5f8 | ths | void OPPROTO glue(op_movl_T1_, REGNAME)(void) |
32 | 81fdc5f8 | ths | { |
33 | 81fdc5f8 | ths | T1 = REG; |
34 | 81fdc5f8 | ths | } |
35 | 81fdc5f8 | ths | |
36 | 81fdc5f8 | ths | void OPPROTO glue(glue(op_movl_, REGNAME), _T0)(void) |
37 | 81fdc5f8 | ths | { |
38 | 81fdc5f8 | ths | SET_REG (T0); |
39 | 81fdc5f8 | ths | } |
40 | 81fdc5f8 | ths | |
41 | 81fdc5f8 | ths | void OPPROTO glue(glue(op_movl_, REGNAME), _T1)(void) |
42 | 81fdc5f8 | ths | { |
43 | 81fdc5f8 | ths | SET_REG (T1); |
44 | 81fdc5f8 | ths | } |
45 | 81fdc5f8 | ths | |
46 | 81fdc5f8 | ths | #undef REG
|
47 | 81fdc5f8 | ths | #undef REGNAME
|
48 | 81fdc5f8 | ths | #undef SET_REG |