src_regs.h 3 KB

#ifndef _src_regs_h_
#define _src_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	dmembase,	$30	# base of DMEM (constant)
.name	initPtr,	$29	# ptr to init data
.name	CPHptr,		$28	# addr of current phase address vector
.name	CAptr,		$27	# addr of current data address vector
.name	fCAptr,		$26	# addr of frac CA vector
.name	iCAptr,		$25	# addr of int CA vector
.name	PHptr,		$24
.name	iCOptr,		$23	# addr of int CA vector
.name	OutPtr,		$22	# pointr to output data
.name	loopctl,	$21	# pointr to output data
.name	tVol,		$20	# address of target volume
.name	temp,		$19
.name	zero,		$0

 ###########################################################################	
 #
 # 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	vONE,		$v31
.name	vSHIFT,		$v30	#
.name	vZEROFOUR,	$v29
.name	vONEFIVE,	$v28
.name	vTWOSIX,	$v27
.name	vTHREESEVEN,	$v26
.name	vMULINC,	$v25	#
.name	vRAMP,		$v24	# linear volume ramp

.name	vfco,		$v23	# fractional current offset
.name	vico,		$v22	# integer current offset
.name	vica,		$v21	# integer current base address
.name	vfcvol,		$v20
.name	vicvol,		$v19
.name	vchparmz,	$v18	# volume target, rate, sound base, coef base
				# pitch increment, phase multiplier
.name	vphaddr,	$v17	# vector of phase addresses
.name	vdata0,		$v16	# data vector 0
.name	vcoef0,		$v15	# coef vector 0
.name	vdata1,		$v14	# data vector 1
.name	vcoef1,		$v13	# coef vector 1
.name	vdata2,		$v12	# data vector 2
.name	vcoef2,		$v11	# coef vector 2
.name	vdata3,		$v10	# data vector 3
.name	vcoef3,		$v9	# coef vector 3
.name	vout0,		$v8
.name	vout1,		$v7
.name	vout2,		$v6
.name	vout3,		$v5
.name	vout,		$v4
.name	vtemp0,		$v3
.name	vtemp1,		$v2
.name	vtemp2,		$v1
.name	vtemp3,		$v0

#endif /* _src_regs_h_ */