qemu/bsd-user/mips/target_syscall.h
<<
>>
Prefs
   1/*
   2 *  mips system call definitions
   3 *
   4 *
   5 *  This program is free software; you can redistribute it and/or modify
   6 *  it under the terms of the GNU General Public License as published by
   7 *  the Free Software Foundation; either version 2 of the License, or
   8 *  (at your option) any later version.
   9 *
  10 *  This program is distributed in the hope that it will be useful,
  11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13 *  GNU General Public License for more details.
  14 *
  15 *  You should have received a copy of the GNU General Public License
  16 *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  17 */
  18#ifndef _MIPS_SYSCALL_H_
  19#define _MIPS_SYSCALL_H_
  20
  21/*
  22 * struct target_pt_regs defines the way the registers are stored on the stack
  23 * during a system call.
  24 */
  25
  26struct target_pt_regs {
  27    /* Saved main processor registers. */
  28    abi_ulong regs[32];
  29
  30    /* Saved special registers. */
  31    abi_ulong cp0_status;
  32    abi_ulong lo;
  33    abi_ulong hi;
  34    abi_ulong cp0_badvaddr;
  35    abi_ulong cp0_cause;
  36    abi_ulong cp0_epc;
  37};
  38
  39#if defined(TARGET_WORDS_BIGENDIAN)
  40#define UNAME_MACHINE "mips"
  41#else
  42#define UNAME_MACHINE "mipsel"
  43#endif
  44
  45#define TARGET_HW_MACHINE       "mips"
  46#define TARGET_HW_MACHINE_ARCH   UNAME_MACHINE
  47
  48/* sysarch() commands */
  49#define TARGET_MIPS_SET_TLS     1
  50#define TARGET_MIPS_GET_TLS     2
  51
  52#endif /* !_MIPS_SYSCALL_H_ */
  53