From owner-p4-projects@FreeBSD.ORG Tue May 24 21:56:02 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF57916A420; Tue, 24 May 2005 21:56:01 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADE4916A41C for ; Tue, 24 May 2005 21:56:01 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8162443D4C for ; Tue, 24 May 2005 21:56:01 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4OLu13r097265 for ; Tue, 24 May 2005 21:56:01 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4OLu1FL097262 for perforce@freebsd.org; Tue, 24 May 2005 21:56:01 GMT (envelope-from peter@freebsd.org) Date: Tue, 24 May 2005 21:56:01 GMT Message-Id: <200505242156.j4OLu1FL097262@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 77417 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2005 21:56:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=77417 Change 77417 by peter@peter_melody on 2005/05/24 21:55:16 flesh out some more. These might work too. Affected files ... .. //depot/projects/hammer/sys/amd64/ia32/ia32_reg.c#4 edit Differences ... ==== //depot/projects/hammer/sys/amd64/ia32/ia32_reg.c#4 (text+ko) ==== @@ -144,20 +144,53 @@ int set_fpregs32(struct thread *td, struct fpreg32 *regs) { + struct save87 *sv_87 = (struct save87 *)regs; + struct env87 *penv_87 = &sv_87->sv_env; + struct savefpu *sv_fpu = &td->td_pcb->pcb_save; + struct envxmm *penv_xmm = &sv_fpu->sv_env; + int i; + + /* FPU control/status */ + penv_xmm->en_cw = penv_87->en_cw; + penv_xmm->en_sw = penv_87->en_sw; + penv_xmm->en_tw = penv_87->en_tw; + penv_xmm->en_rip = penv_87->en_fip; + /* penv_87->en_fcs and en_fos ignored, see above */ + penv_xmm->en_opcode = penv_87->en_opcode; + penv_xmm->en_rdp = penv_87->en_foo; + + /* FPU registers */ + for (i = 0; i < 8; ++i) + sv_fpu->sv_fp[i].fp_acc = sv_87->sv_ac[i]; + for (i = 8; i < 16; ++i) + bzero(&sv_fpu->sv_fp[i].fp_acc, sizeof(sv_fpu->sv_fp[i].fp_acc)); - return (ENOSYS); + return (0); } int fill_dbregs32(struct thread *td, struct dbreg32 *regs) { + struct dbreg dr; + int err, i; - return (ENOSYS); + err = fill_dbregs(td, &dr); + for (i = 0; i < 8; i++) + regs->dr[i] = dr.dr[i]; + for (i = 8; i < 16; i++) + regs->dr[i] = 0; + return (err); } int set_dbregs32(struct thread *td, struct dbreg32 *regs) { + struct dbreg dr; + int i; - return (ENOSYS); + for (i = 0; i < 8; i++) + dr.dr[i] = regs->dr[i]; + for (i = 8; i < 16; i++) + dr.dr[i] = 0; + return (set_dbregs(td, &dr)); }