1 // mips.h - Class declaration for the MIPS monitor support.
2 // Currently supported monitors: idt. -*- C++ -*-
4 // Copyright (C) 1999, 2000 Red Hat.
5 // This file is part of SID and is licensed under the GPL.
6 // See the file COPYING.SID for conditions for redistribution.
13 // ??? mips_idt, and have 64_p attribute?
14 // [with associated changes to gloss32/gloss64]
16 class mips32_idt: public gloss32
24 // Begin idt syscalls here to distinguish them from others.
25 // blah blah ... no suitable value ... blah blah
26 enum { SYSCALL_MIN = 0x42000 };
32 SYSCALL_GET_MEM_INFO = 55,
36 // _exit() stuff's this in the `code' field of `break' insns.
37 enum { BREAK_EXIT = 0xffc00 };
39 // The main RAM memory of the cpu we support.
40 // ??? multi-cpu support, blah blah blah
43 // The ROM memory of the monitor we emulate.
46 // We need to do some extra processing at reset time.
49 // ABI-specifics, for getting syscall arguments and setting results.
50 // ??? Class by itself.
51 // ??? Perhaps this shouldn't be here at all as it's really an
52 // implementation detail (but lots of implementations will probably use it).
53 bool get_int_argument(unsigned index, int32& value);
54 bool set_int_result(int32 value);
55 bool set_error_result(int32 value);
57 // Return boolean indicating if cpu is requesting something we're to handle.
58 bool syscall_trap_p();
59 // Perform a system call trap.
62 // Convert host errno to target errno.
63 int host_to_target_errno (int errno_);