avoid executing cache opcode on non-4 byte aligned boundaries

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-13 16:41:26 +02:00
parent fb25a86108
commit 214af04cf5

View file

@ -9,15 +9,15 @@
subu $t1, $t3, $t2 subu $t1, $t3, $t2
1: 1:
cache 1, 0($t0) cache 1, 0($t0)
addiu $t1, $t1, 0xffff addiu $t1, $t1, -0x4
bne $t1, $zero, 1b bne $t1, $zero, 1b
addiu $t0, $t0, 0x1 addiu $t0, $t0, 0x4
sync sync
move $t0, $t2 move $t0, $t2
subu $t1, $t3, $t2 subu $t1, $t3, $t2
2: 2:
cache 0, 0($t0) cache 0, 0($t0)
addiu $t1, $t1, 0xffff addiu $t1, $t1, -0x4
bne $t1, $zero, 2b bne $t1, $zero, 2b
addiu $t0, $t0, 0x1 addiu $t0, $t0, 0x4
sync sync