]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
avoid executing cache opcode on non-4 byte aligned boundaries
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 13 May 2011 14:41:26 +0000 (16:41 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 13 May 2011 14:41:26 +0000 (16:41 +0200)
grub-core/kern/mips/cache_flush.S

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