]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/mips/m16e.igen
* mips.igen: New mips16e model and include m16e.igen.
[thirdparty/binutils-gdb.git] / sim / mips / m16e.igen
1 // -*- C -*-
2
3 // Simulator definition for the MIPS16e instructions.
4 // Copyright (C) 2005 Free Software Foundation, Inc.
5 // Contributed by Nigel Stephens (nigel@mips.com) and
6 // David Ung (davidu@mips.com) of MIPS Technologies.
7 //
8 // This file is part of GDB, the GNU debugger.
9 //
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 2, or (at your option)
13 // any later version.
14 //
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License along
21 // with this program; if not, write to the Free Software Foundation, Inc.,
22 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24
25 11101,3.RX,100,10001:RR:16::SEB
26 "seb r<TRX>"
27 *mips16e:
28 {
29 TRACE_ALU_INPUT1 (GPR[TRX]);
30 GPR[TRX] = EXTEND8 (GPR[TRX]);
31 TRACE_ALU_RESULT (GPR[TRX]);
32 }
33
34
35 11101,3.RX,101,10001:RR:16::SEH
36 "seh r<TRX>"
37 *mips16e:
38 {
39 TRACE_ALU_INPUT1 (GPR[TRX]);
40 GPR[TRX] = EXTEND16 (GPR[TRX]);
41 TRACE_ALU_RESULT (GPR[TRX]);
42 }
43
44 11101,3.RX,110,10001:RR:16::SEW
45 "sew r<TRX>"
46 *mips16e:
47 {
48 check_u64 (SD_, instruction_0);
49 TRACE_ALU_INPUT1 (GPR[TRX]);
50 GPR[TRX] = EXTEND32 (GPR[TRX]);
51 TRACE_ALU_RESULT (GPR[TRX]);
52 }
53
54 11101,3.RX,000,10001:RR:16::ZEB
55 "zeb r<TRX>"
56 *mips16e:
57 {
58 TRACE_ALU_INPUT1 (GPR[TRX]);
59 GPR[TRX] = (unsigned_word)(unsigned8)(GPR[TRX]);
60 TRACE_ALU_RESULT (GPR[TRX]);
61 }
62
63 11101,3.RX,001,10001:RR:16::ZEH
64 "zeh r<TRX>"
65 *mips16e:
66 {
67 TRACE_ALU_INPUT1 (GPR[TRX]);
68 GPR[TRX] = (unsigned_word)(unsigned16)(GPR[TRX]);
69 TRACE_ALU_RESULT (GPR[TRX]);
70 }
71
72 11101,3.RX,010,10001:RR:16::ZEW
73 "zew r<TRX>"
74 *mips16e:
75 {
76 check_u64 (SD_, instruction_0);
77 TRACE_ALU_INPUT1 (GPR[TRX]);
78 GPR[TRX] = (unsigned_word)(unsigned32)(GPR[TRX]);
79 TRACE_ALU_RESULT (GPR[TRX]);
80 }
81
82
83 11101,3.RX,100,00000:RR:16::JRC
84 "jrc r<TRX>"
85 *mips16e:
86 {
87 NIA = GPR[TRX];
88 }
89
90
91 11101,000,101,00000:RR:16::JRCRA
92 "jrc ra"
93 *mips16e:
94 {
95 NIA = RA;
96 }
97
98
99 11101,3.RX,110,00000:RR:16::JALRC
100 "jalrc r<TRX>"
101 *mips16e:
102 {
103 RA = NIA;
104 NIA = GPR[TRX];
105 }