.text .set noreorder #ifdef __sgi .ent incrementSequence #endif .globl incrementSequence /* MIPS o32 ABI, as it is implemented on IRIX 6.5.22m */ /* input: MSB [R4:R5] LSB */ incrementSequence: move $9,$0 addiu $8,$0,1 move $6,$4 move $7,$5 beq $5,$0,.next .loop: addiu $5,$5,-1 #ifdef __sgi .repeat 255 #else .rept 255 #endif addu $9,$9,$8 .endr bne $5,$0,.loop addu $9,$9,$8 .next: addiu $10,$4,-1 bgtu $4,$10,.loop move $4,$10 srl $2,$7,24 sll $4,$6,8 sll $3,$7,8 j $31 or $2,$2,$4 /* output: MSB [R2:R3] LSB */ #ifdef __sgi .end incrementSequence #endif