mtxidentf.s 1.48 KB
/************************************************************************
 Copyright (C) 1998,1999 NINTENDO CO,Ltd,
 Copyright (C) 1998,1999 MONEGI CORPORATION,
	All Rights Reserved
This program is a trade secret of NINTENDO CO,Ltd and MONEGI Corp. 
and it is not to be reproduced, published, disclosed to others, copied,
adapted, distributed, or displayed without the prior authorization of 
NINTENDO CO,Ltd. and MONEGI Corp. Licensee agrees to attach or embed 
this Notice on all copies of the program, including partial copies or 
modified versions thereof.
*************************************************************************/
/************************************************************************
 $Date: 2002/10/29 08:06:43 $
 $Revision: 1.1.1.1 $
 $Author: blythe $
************************************************************************/
#include <asm.h>
#include <regdef.h>

/*
 * guMtxIdentF( float matrix[4][4] )
 *	浮動少数行列に単位行列を代入する
 *	アライメントが4バイトバウンダリのときのみ対応
 * 入力
 *	a0 = matrix
 * 出力
 *	*matrix	単位行列
 */
	.text
	.align	5
LEAF( guMtxIdentF )
	.set reorder

	li	t0, 0x3f800000	/* t0 = 1.0 */

	sw	t0, 0(a0)
	sw	zero, 4(a0)	/* 1行目 */
	sw	zero, 8(a0)
	sw	zero, 12(a0)

	sw	zero, 16(a0)	/* 2行目 */
	sw	t0, 20(a0)
	sw	zero, 24(a0)
	sw	zero, 28(a0)

	sw	zero, 32(a0)	/* 3行目 */
	sw	zero, 36(a0)
	sw	t0, 40(a0)
	sw	zero, 44(a0)

	sw	zero, 48(a0)	/* 4行目 */
	sw	zero, 52(a0)
	sw	zero, 56(a0)
	sw	t0, 60(a0)

	j	ra

	END( guMtxIdentF )

/* End of file */