Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Dec 2018 04:13:14 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341751 - head/sys/powerpc/booke
Message-ID:  <201812090413.wB94DEeT089025@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Dec  9 04:13:14 2018
New Revision: 341751
URL: https://svnweb.freebsd.org/changeset/base/341751

Log:
  powerpc/SPE: Reload vector registers after efdabs/efdnabs/efdneg
  
  While here, also style(9)-adjust indents around this code.

Modified:
  head/sys/powerpc/booke/spe.c

Modified: head/sys/powerpc/booke/spe.c
==============================================================================
--- head/sys/powerpc/booke/spe.c	Sun Dec  9 03:07:45 2018	(r341750)
+++ head/sys/powerpc/booke/spe.c	Sun Dec  9 04:13:14 2018	(r341751)
@@ -464,17 +464,17 @@ spe_handle_fpdata(struct trapframe *frame)
 		switch (instr_sec_op) {
 		case EVFSABS:
 			curthread->td_pcb->pcb_vec.vr[rd][0] = 
-				curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31);
+			    curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31);
 			frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31);
 			break;
 		case EVFSNABS:
 			curthread->td_pcb->pcb_vec.vr[rd][0] = 
-				curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31);
+			    curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31);
 			frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31);
 			break;
 		case EVFSNEG:
 			curthread->td_pcb->pcb_vec.vr[rd][0] = 
-				curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31);
+			    curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31);
 			frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31);
 			break;
 		default:
@@ -542,15 +542,18 @@ spe_handle_fpdata(struct trapframe *frame)
 		switch (instr_sec_op) {
 		case EFDABS:
 			curthread->td_pcb->pcb_vec.vr[rd][0] = 
-				curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31);
+			    curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31);
+			enable_vec(curthread);
 			break;
 		case EFDNABS:
 			curthread->td_pcb->pcb_vec.vr[rd][0] = 
-				curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31);
+			    curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31);
+			enable_vec(curthread);
 			break;
 		case EFDNEG:
 			curthread->td_pcb->pcb_vec.vr[rd][0] = 
-				curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31);
+			    curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31);
+			enable_vec(curthread);
 			break;
 		case EFDCFS:
 			spe_explode(&fpemu, &fpemu.fe_f3, SINGLE,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812090413.wB94DEeT089025>