powerpc: Fix usage of 64-bit instruction in 32-bit altivec code
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 8 Dec 2009 18:45:45 +0000 (18:45 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 9 Dec 2009 07:10:12 +0000 (18:10 +1100)
e821ea70f3b4873b50056a1e0f74befed1014c09 introduced a bug by copying
some 64-bit originated code as-is to be used by both 32 and 64-bit
but this code contains a 64-bit ony "cmpdi" instruction.

This changes it to cmpwi, which is fine since VRSAVE can only contains
a 32-bit value anyway.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@kernel.org>
arch/powerpc/kernel/vector.S

index 67b6916f0e942283553a2a5d3b5b82b6899fff19..fe460482fa68dff8d35d36e94eec996b2644e679 100644 (file)
@@ -58,7 +58,7 @@ _GLOBAL(load_up_altivec)
         * all 1's
         */
        mfspr   r4,SPRN_VRSAVE
-       cmpdi   0,r4,0
+       cmpwi   0,r4,0
        bne+    1f
        li      r4,-1
        mtspr   SPRN_VRSAVE,r4