1 /* Stubs for floating-point coprocessor.
2    Copyright 2004, 2009 Brian R. Gaeke.
3 
4 This file is part of VMIPS.
5 
6 VMIPS is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2 of the License, or (at your
9 option) any later version.
10 
11 VMIPS is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15 
16 You should have received a copy of the GNU General Public License along
17 with VMIPS; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
19 
20 #include "fpu.h"
21 #include "cpu.h"
22 #include "vmips.h"
23 #include "excnames.h"
24 #include "stub-dis.h"
25 #include <cstdio>
26 
cpone_emulate(uint32 instr,uint32 pc)27 void FPU::cpone_emulate (uint32 instr, uint32 pc)
28 {
29     fprintf (stderr, "FPU instruction %x not implemented at pc=0x%x:\n",
30         instr, pc);
31     machine->disasm->disassemble (pc, instr);
32     cpu->exception (CpU, ANY, 1);
33 }
34 
read_reg(uint16 regno)35 uint32 FPU::read_reg (uint16 regno)
36 {
37     fprintf (stderr, "FPU read from register %u unimplemented\n", regno);
38     return 0xffffffff;
39 }
40 
write_reg(uint16 regno,uint32 word)41 void FPU::write_reg (uint16 regno, uint32 word)
42 {
43     fprintf (stderr, "FPU write to register %u unimplemented\n", regno);
44 }
45