tst_regs.h 2.25 KB

#ifndef _tst_regs_h_
#define _tst_regs_h_ 1

	
 ############################################################################	
 #
 # Scalar Register Usage Conventions:
 #
 # Starting from $31 growing down, we allocate 'permanent' registers.
 # These should only be re-used carefully, possibly saved/restored.
 # (during development we might re-shuffle these so the more crucial
 # or stable ones remain higher)
 #
 # Register $0 is always 0, as per the MIPS R4000 spec.
 #
 # Starting from $1 growing up, we use 'temporary' registers which
 # are free to be used by procedures or small blocks of code. These
 # registers are not named (or they are .name'd and .unname'd in small
 # code blocks).
 #
 # Function parameters are passed and returned in $1, $2, $3, etc.
 #
	
.name	return,		$31	# MIPS R4000 convention for JAL op
.name	return_save,	$30
.name		rsp_state,	$29	# pointer to RSP state in DMEM
.name		tri_x,		$28
.name		tri_y,		$27
.name		numtri,		$26
.name	shadecol,	$25
.name	shadecov,	$24

.name	outp,		$23	

.name		tloc_x,		$22
.name		tloc_y,		$21
.name   mem_addr,       $20
.name   dram_addr,      $19
.name   dma_len,        $18
.name   iswrite,        $17
.name	numtst,		$16


.name	zero,		$0

.name	taskhdr,	$1

.name	parm1,		$2
.name	parm2,		$3
.name	parm3,		$4
.name	parm4,		$5
.name	parm5,		$6
.name	parm6,		$7
.name	parm7,		$8
.name  	tmp,            $9
	
.unname mem_addr
.unname dram_addr
.unname dma_len
.unname iswrite
.unname tmp
/* $10 ... $19 reserved for test use */

 ############################################################################	
 #
 # Vector Register Usage Conventions:
 #
 # Similar to scalar registers, named registers start at $v31 and grow down.
 # These should only be re-used carefully, possibly saved/restored.
 # (during development we might re-shuffle these so the more crucial
 # or stable ones remain higher)
 #
 # Register $v0 is NOT always 0, like in the MIPS R4000 spec.
 #
 # Starting from $v1 growing up, we use 'temporary' registers which
 # are free to be used by procedures or small blocks of code. These
 # registers are not named (or they are .name'd and .unname'd in small
 # code blocks).
 #
 # Function parameters are passed and returned in $v1, $v2, $v3, etc.
 #
.name   vconst,		$v31
.name   vconst1,	$v30


#endif /* _tst_regs_h_ */