3 // Simulator definition for the SmartMIPS extensions.
4 // Copyright (C) 2005-2016 Free Software Foundation, Inc.
5 // Contributed by Nigel Stephens (nigel@mips.com) and
6 // David Ung (davidu@mips.com) of MIPS Technologies.
8 // This file is part of GDB, the GNU debugger.
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 3 of the License, or
13 // (at your option) any later version.
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.
20 // You should have received a copy of the GNU General Public License
21 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 011100,5.BASE,5.INDEX,5.RD,00010,001000:SPECIAL:32::LWXS
24 "lwxs r<RD>, <INDEX>(r<BASE>)"
27 GPR[RD] = EXTEND32 (do_load(SD_, AccessLength_WORD, GPR[BASE], GPR[INDEX]<<2));
30 011100,5.RS,5.RT,00000,10001,000001:SPECIAL:32::MADDP
38 check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
39 TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
44 for (i = 0; i < 32; i++)
51 LO ^= EXTEND32 (VL4_8 (res));
52 HI ^= EXTEND32 (VH4_8 (res));
53 TRACE_ALU_RESULT2 (HI, LO);
57 000000,0000000000,5.RD,00001,010010:SPECIAL:32::MFLHXU
61 check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
62 TRACE_ALU_INPUT3 (ACX,HI,LO);
67 TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RD]);
70 000000,5.RS,000000000000001,010011:SPECIAL:32::MTLHX
74 check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
75 TRACE_ALU_INPUT3 (HI,LO,GPR[RS]);
79 TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RS]);
82 000000,5.RS,5.RT,00000,10001,011001:SPECIAL:32::MULTP
89 check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
90 TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
95 for (i = 0; i < 32; i++)
102 LO = EXTEND32 (VL4_8 (res));
103 HI = EXTEND32 (VH4_8 (res));
105 TRACE_ALU_RESULT2 (HI, LO);
108 011100,5.RS,5.RT,00000,10010,000001:SPECIAL:32::PPERM
113 ACX = (ACX << 6) | MSEXTRACTED(HI,26,31);
114 HI = EXTEND32 ((HI << 6) | MSEXTRACTED(LO,26,31));
115 LO = EXTEND32 (LO << 6);
116 for (i = 0; i < 6; i++) {
119 int tbit = EXTRACTED(GPR[RT],sbit,ebit);
120 LO |= MSEXTRACTED(GPR[RS],tbit,tbit) << i;