blob: e5189572956c5221c378f542d9c945a0ca103a2d [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * This program is free software; you can distribute it and/or modify it
3 * under the terms of the GNU General Public License (Version 2) as
4 * published by the Free Software Foundation.
5 *
6 * This program is distributed in the hope it will be useful, but WITHOUT
7 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9 * for more details.
10 *
11 * You should have received a copy of the GNU General Public License along
12 * with this program; if not, write to the Free Software Foundation, Inc.,
13 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
14 *
Atsushi Nemotoeae89072006-05-16 01:26:03 +090015 * Further private data for which no space exists in mips_fpu_struct.
16 * This should be subsumed into the mips_fpu_struct structure as
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 * defined in processor.h as soon as the absurd wired absolute assembler
18 * offsets become dynamic at compile time.
19 *
20 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
21 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
22 */
23#ifndef _ASM_FPU_EMULATOR_H
24#define _ASM_FPU_EMULATOR_H
25
Ralf Baechleba3049e2008-10-28 17:38:42 +000026#include <asm/break.h>
27#include <asm/inst.h>
28
Ralf Baechle4a99d1e2005-05-11 12:02:48 +000029struct mips_fpu_emulator_stats {
30 unsigned int emulated;
31 unsigned int loads;
32 unsigned int stores;
33 unsigned int cp1ops;
34 unsigned int cp1xops;
35 unsigned int errors;
Linus Torvalds1da177e2005-04-16 15:20:36 -070036};
37
Ralf Baechle4a99d1e2005-05-11 12:02:48 +000038extern struct mips_fpu_emulator_stats fpuemustats;
Ralf Baechle0bd5d2e2005-02-28 17:29:15 +000039
Ralf Baechleba3049e2008-10-28 17:38:42 +000040extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir,
41 unsigned long cpc);
42extern int do_dsemulret(struct pt_regs *xcp);
43
44/*
45 * Instruction inserted following the badinst to further tag the sequence
46 */
47#define BD_COOKIE 0x0000bd36 /* tne $0, $0 with baggage */
48
49/*
50 * Break instruction with special math emu break code set
51 */
52#define BREAK_MATH (0x0000000d | (BRK_MEMU << 16))
53
Linus Torvalds1da177e2005-04-16 15:20:36 -070054#endif /* _ASM_FPU_EMULATOR_H */