Commit e2f5a3c1 authored by Paul Mackerras's avatar Paul Mackerras

powerpc/64: Fix bug in setting floating-point exception mode

When loading up the FPU, we were using a 'ld' (load doubleword)
instruction to get the FP exception mode from the thread_struct,
but it's only an int field.  This changes the ld to lwz (load
word and zero-extend).
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 6cb6524d
...@@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu) ...@@ -66,7 +66,7 @@ _GLOBAL(load_up_fpu)
#else #else
ld r4,PACACURRENT(r13) ld r4,PACACURRENT(r13)
addi r5,r4,THREAD /* Get THREAD */ addi r5,r4,THREAD /* Get THREAD */
ld r4,THREAD_FPEXC_MODE(r5) lwz r4,THREAD_FPEXC_MODE(r5)
ori r12,r12,MSR_FP ori r12,r12,MSR_FP
or r12,r12,r4 or r12,r12,r4
std r12,_MSR(r1) std r12,_MSR(r1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment