test_1.s 2.37 KB
/*******************************
 *prog name:   test1        
 * 
 *
 *******************************/
                         
	.text	        
               
start:  nop;
	nop;
	nop;
	nop;
	nop;
	break;
	lui $1, 0x1234
	ori $1, $0, 0x5678
	lui $2, 0xdead
	ori $2, $0, 0xbeef
        or  $3, $1, $2;
        xor $4, $1, $2;
        nop;
        sw $1, 0($0)
        sw $2, 4($0)
        sw $3, 8($0)
        sw $4, 12($0)
        or $5,$0,$0
        or $6,$0,$0
        or $7,$0,$0
        or $8,$0,$0
        or $9,$0,$0
        or $10,$0,$0
        or $11,$0,$0
        or $12,$0,$0
        or $13,$0,$0
        or $14,$0,$0
        or $15,$0,$0
        or $16,$0,$0
        or $17,$0,$0
        or $18,$0,$0
        or $19,$0,$0
        lqv $v0, 0($0)
        lqv $v1, 0($0)
        lqv $v2, 0($0)
        lqv $v3, 0($0)
        lqv $v4, 0($0)
        or $28,$0,$0
        or $29,$0,$0
        or $30,$0,$0
        or $31,$0,$0
	/* R1=R2=12345678, R3=0 */
        lui  $1, 0x1234 
        ori  $1, 0x5678 
        or   $2, $1, $0
	or   $3, $0, $0

	bne  $1, $2, L1f  /* not taken */
        or   $5, $1, $0
        xor  $6, $1, $1
L1f:	
	bne  $3, $1, L2f  /* taken */
        vadd $v5, $v1, $v2
	nor  $9, $8, $0
	lui  $10, 0xabcd
	lui  $9, 0xfeed
	nop
L2f:	
	bne  $1, $1, L3f  /* not taken */
        vsub $v5, $v1, $v0
        xor  $6, $1, $1
L3f:	
	bne  $2, $0, L4f  /* taken */
        and  $8, $6, $2
	nor  $9, $8, $0
	lui  $10, 0xabcd
	lui  $9, 0xfeed
	nop
	nop
	nop
L4f:	vnor $v7, $v0, $v1
	vadd $v8, $v5, $v7
	vxor $v9, $v8, $v7
	vmudl $v10, $v7, $v9
	lui  $20, 0x9876
	ori  $21, $20, 0xabcd
	xor  $22, $20, $20
	and  $23, $22, $21
        vabs $v11, $v10, $v1	
        lw   $24, 0($0)
	and  $25, $24, $1
        vaddc $v12, $v11, $v11	
        vsubc $v13, $v10, $v11	
        vmudm $v14, $v9, $v8	
	sw   $25, 12($2)
	add  $26, $20, $21
	sw   $26, 8($5)
	lw   $21, 8($5)
	sw   $21, 8($5)
	lw   $22, 8($5)
	lui  $1, 0x1234
	beq  $3, $3, L5f
	lw   $3, 8($5)
L5f:	beq  $3, $3, L6f
L6f:	sub  $3, $0, $3
	add  $2, $8, $10
	xor  $6, $7, $12
	bne  $3, $0, L7f
	lw   $3, 8($5)
L7f:	beq  $3, $3, L8f
L8f:	sub  $3, $0, $3
	beq  $3, $3, L9f
	lw   $3, 8($5)
L9f:	bne  $3, $0, LAf
LAf:	sub  $3, $0, $3
	bne  $3, $0, LBf
	lw   $3, 8($5)
LBf:	bne  $3, $0, LCf
LCf:	sub  $3, $0, $3
	add  $2, $8, $10
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	nop
	beq  $0, $0, start
	nop
	nop
	nop