From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 515 invoked from network); 11 Apr 2004 07:14:38 -0000 Received: from unknown (HELO mms1.broadcom.com) (63.70.210.58) by sources.redhat.com with SMTP; 11 Apr 2004 07:14:38 -0000 Received: from 63.70.210.1 by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (MMS v5.6.0)); Sun, 11 Apr 2004 00:14:39 -0700 X-Server-Uuid: 97B92932-364A-4474-92D6-5CFE9C59AD14 Received: from mail-sj1-5.sj.broadcom.com (mail-sj1-5.sj.broadcom.com [10.16.128.236]) by mon-irva-11.broadcom.com (8.9.1/8.9.1) with ESMTP id AAA20946 for ; Sun, 11 Apr 2004 00: 13:48 -0700 (PDT) Received: from ldt-sj3-010.sj.broadcom.com (ldt-sj3-010 [10.21.64.10]) by mail-sj1-5.sj.broadcom.com (8.12.9/8.12.9/SSF) with ESMTP id i3B7EKov028962 for ; Sun, 11 Apr 2004 00:14:20 -0700 (PDT) Received: (from cgd@localhost) by ldt-sj3-010.sj.broadcom.com ( 8.11.6/8.9.3) id i3B7EKN07718; Sun, 11 Apr 2004 00:14:20 -0700 X-Authentication-Warning: ldt-sj3-010.sj.broadcom.com: cgd set sender to cgd@broadcom.com using -f To: gdb-patches@sources.redhat.com Subject: Re: [applied MIPS sim patch] add MDMX testsuite entries, some utils References: From: cgd@broadcom.com Date: Sun, 11 Apr 2004 07:14:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 X-WSS-ID: 6C662FD51P81586972-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00248.txt.bz2 Just added this in as well. (Noticed the problem in clrset_fp_cc when converting the paired-single tests to use this, rather than direct CC manipulation.) cgd -- 2004-04-11 Chris Demetriou * utils-fpu.inc (enable_fpu, ckm_fp_cc): New macros. (clrset_fp_cc): Fix mask used for upper 7 condition codes. * utils-mdmx.inc: Include utils-fpu.inc. (enable_mdmx): Use enable_fpu. Index: utils-fpu.inc =================================================================== RCS file: /cvs/src/src/sim/testsuite/sim/mips/utils-fpu.inc,v retrieving revision 1.1 diff -u -p -r1.1 utils-fpu.inc --- utils-fpu.inc 11 Apr 2004 06:28:08 -0000 1.1 +++ utils-fpu.inc 11 Apr 2004 07:11:47 -0000 @@ -18,6 +18,12 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + .macro enable_fpu fr + mfc0 $20, $12 + or $20, $20, (1 << 29) | (\fr << 26) + mtc0 $20, $20 + .endm + ### ### Data movement macros ### @@ -57,9 +63,9 @@ .macro clrset_fp_cc clr, set cfc1 $20, $31 - or $20, $20, (((\clr & 0xf7) << 24) | ((\clr & 0x01) << 23)) - xor $20, $20, (((\clr & 0xf7) << 24) | ((\clr & 0x01) << 23)) - or $20, $20, (((\set & 0xf7) << 24) | ((\set & 0x01) << 23)) + or $20, $20, (((\clr & 0xfe) << 24) | ((\clr & 0x01) << 23)) + xor $20, $20, (((\clr & 0xfe) << 24) | ((\clr & 0x01) << 23)) + or $20, $20, (((\set & 0xfe) << 24) | ((\set & 0x01) << 23)) ctc1 $20, $31 .endm @@ -86,6 +92,14 @@ .macro ck_fp_cc v get_fp_cc $20 xori $20, $20, \v + bnez $20, _fail + nop + .endm + + .macro ckm_fp_cc v, mask + get_fp_cc $20 + xori $20, $20, \v + andi $20, $20, \mask bnez $20, _fail nop .endm Index: utils-mdmx.inc =================================================================== RCS file: /cvs/src/src/sim/testsuite/sim/mips/utils-mdmx.inc,v retrieving revision 1.1 diff -u -p -r1.1 utils-mdmx.inc --- utils-mdmx.inc 11 Apr 2004 06:28:08 -0000 1.1 +++ utils-mdmx.inc 11 Apr 2004 07:11:47 -0000 @@ -18,15 +18,18 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + .include "utils-fpu.inc" + ### ### Shared macros ### - # Enable MDMX, by setting Status.CU1, .FR, and .MX + # Enable MDMX: enable the FPU w/ FR=1, then set Status.MX .macro enable_mdmx - mfc0 $20, $12 - or $20, $20, (1 << 29) | (1 << 26) | (1 << 24) - mtc0 $20, $12 + enable_fpu 1 + mfc0 $20, $12 + or $20, $20, (1 << 24) + mtc0 $20, $12 .endm