3 // Simulator definition for the SmartMIPS extensions.
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.
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 2, or (at your option)
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 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.
24 011100,5.BASE,5.INDEX,5.RD,00010,001000:SPECIAL:32::LWXS
25 "lwxs r<RD>, <INDEX>(r<BASE>)"
28 GPR[RD] = EXTEND32 (do_load(SD_, AccessLength_WORD, GPR[BASE], GPR[INDEX]<<2));
31 011100,5.RS,5.RT,00000,10001,000001:SPECIAL:32::MADDP
39 check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
40 TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
45 for (i = 0; i < 32; i++)
52 LO ^= EXTEND32 (VL4_8 (res));
53 HI ^= EXTEND32 (VH4_8 (res));
54 TRACE_ALU_RESULT2 (HI, LO);
58 000000,0000000000,5.RD,00001,010010:SPECIAL:32::MFLHXU
62 check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
63 TRACE_ALU_INPUT3 (ACX,HI,LO);
68 TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RD]);
71 000000,5.RS,000000000000001,010011:SPECIAL:32::MTLHX
75 check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
76 TRACE_ALU_INPUT3 (HI,LO,GPR[RS]);
80 TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RS]);
83 000000,5.RS,5.RT,00000,10001,011001:SPECIAL:32::MULTP
90 check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
91 TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
96 for (i = 0; i < 32; i++)
103 LO = EXTEND32 (VL4_8 (res));
104 HI = EXTEND32 (VH4_8 (res));
106 TRACE_ALU_RESULT2 (HI, LO);
109 011100,5.RS,5.RT,00000,10010,000001:SPECIAL:32::PPERM
114 ACX = (ACX << 6) | MSEXTRACTED(HI,26,31);
115 HI = EXTEND32 ((HI << 6) | MSEXTRACTED(LO,26,31));
116 LO = EXTEND32 (LO << 6);
117 for (i = 0; i < 6; i++) {
120 int tbit = EXTRACTED(GPR[RT],sbit,ebit);
121 LO |= MSEXTRACTED(GPR[RS],tbit,tbit) << i;