From 7ac993bf17265684afae057d3696a87cd7d91963 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 21 Apr 2002 22:43:50 +0000 Subject: [PATCH] Fix WAW dependency violation on r17 (line 198) that only exists for the SMP case. While on the subject, remove unnecessary stops. I don't know if this resolves the memory corruption I'm seeing, but it does have the potential. We'll see... --- sys/ia64/ia64/swtch.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/ia64/ia64/swtch.s b/sys/ia64/ia64/swtch.s index 18e9e649652f..3c2d37f7b0fd 100644 --- a/sys/ia64/ia64/swtch.s +++ b/sys/ia64/ia64/swtch.s @@ -195,6 +195,7 @@ ENTRY(cpu_switch, 0) mov ar.rsc=3 // turn RSE back on #ifdef SMP + ;; add r17 = PC_CPUID, r13 movl r16 = smp_active ;; @@ -223,15 +224,15 @@ ENTRY(cpu_switch, 0) 3: alloc r15=ar.pfs,0,0,2,0 // create temporary output frame mov r4=ret0 // save from call + #ifdef SMP - ;; add r14=PC_CURTHREAD,r13 ;; ld8 out0=[r14] mov out1=1 br.call.sptk.few rp=ia64_fpstate_save // clear fpcurthread #endif - ;; + add r14=PC_CURTHREAD,r13 ;; st8 [r14]=r4 // set r13->pc_curthread