Change to fix bug with constant handling in locore.
authorrahnds <rahnds@openbsd.org>
Sun, 26 Jan 1997 09:06:38 +0000 (09:06 +0000)
committerrahnds <rahnds@openbsd.org>
Sun, 26 Jan 1997 09:06:38 +0000 (09:06 +0000)
16 bit operations should not be done on 32 bit quantities.

sys/arch/powerpc/powerpc/locore.S

index a37b872..5b277a5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: locore.S,v 1.3 1997/01/21 17:00:09 rahnds Exp $       */
+/*     $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $       */
 /*     $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $    */
 
 /*
@@ -806,7 +806,9 @@ _C_LABEL(ipkdbsize) =       .-_C_LABEL(ipkdblow)
        mtsprg  3,3;                                                    \
 /* Disable translation, machine check and recoverability: */           \
        mfmsr   2;                                                      \
-       andi.   2,2,~(PSL_DR|PSL_IR|PSL_ME|PSL_RI);                     \
+       lis     3,(PSL_DR|PSL_IR|PSL_ME|PSL_RI)@ha;                     \
+       addi    3,3,(PSL_DR|PSL_IR|PSL_ME|PSL_RI)@l;                    \
+       andc    2,2,3;                                                  \
        mtmsr   2;                                                      \
        isync;                                                          \
 /* Decide whether we return to user mode: */                           \