1 # MIPS simulator testsuite utility functions.
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Contributed by Chris Demetriou of Broadcom Corporation.
5 # This file is part of the GNU simulators.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22 # $1, $4, $5, %6, are used as temps by the macros defined here.
39 # The MIPS simulator uses "break 0x3ff" as the code to exit,
40 # with the return value in $4 (a0).
75 # The MIPS simulator can use multiple different monitor types,
76 # so we hard-code the simulator "write" reserved instruction opcode,
77 # rather than jumping to a vector that invokes it. The operation
78 # expects RA to point to the location at which to continue
83 # Write opcode (reserved instruction). See sim_monitor and its
84 # callers in sim/mips/interp.c.
85 .word 0x00000005 | ((8 << 1) << 6)
109 .macro load32 reg, val
114 .macro load64 reg, val
119 .macro loadaddr reg, addr
124 .macro checkreg reg, expreg
128 beq \expreg, \reg, 901f
136 .macro check32 reg, val
145 .macro check64 reg, val