From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19548 invoked by alias); 2 Aug 2005 19:35:23 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 19526 invoked by uid 22791); 2 Aug 2005 19:35:16 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 02 Aug 2005 19:35:16 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j72JZFY7013171; Tue, 2 Aug 2005 15:35:15 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j72JZEV31553; Tue, 2 Aug 2005 15:35:14 -0400 Received: from [172.16.14.227] (IDENT:Gt4PqbHAodzs7J2mL5tBe+hpWIc0NqBP@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id j72JZE1M016182; Tue, 2 Aug 2005 15:35:14 -0400 Message-ID: <42EFCAF2.1070602@redhat.com> Date: Tue, 02 Aug 2005 19:35:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: cgen@sources.redhat.com, sid@sources.redhat.com Subject: [patch][commit] Floating Point Support for SID Content-Type: multipart/mixed; boundary="------------080702090403090300090607" X-SW-Source: 2005-q3/txt/msg00010.txt.bz2 This is a multi-part message in MIME format. --------------080702090403090300090607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 448 Hi, I've committed this patch which makes a small change to the generated code for accurate floating point ops. The change is to not dereference CGEN_CPU_FPU (current_cpu)->ops->XXXXX. This makes no difference for cgen simulators generated for sim/common, but does allow the implementation of 'ops' to be a C++ class with virtual member functions for each operation for SID. The SID patch which makes use of this will follow shortly. Dave --------------080702090403090300090607 Content-Type: text/plain; name="cgen-fp.sources.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-fp.sources.ChangeLog" Content-length: 194 2005-08-02 Dave Brolley * rtl-c.scm (s-unop): Don't dereference CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code. (s-binop, s-convop, s-cmpop): Likewise. --------------080702090403090300090607 Content-Type: text/plain; name="cgen-fp.sources.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-fp.sources.patch.txt" Content-length: 4014 Index: cgen/rtl-c.scm =================================================================== RCS file: /cvs/src/src/cgen/rtl-c.scm,v retrieving revision 1.6 diff -c -p -r1.6 rtl-c.scm *** cgen/rtl-c.scm 15 Jun 2005 21:28:18 -0000 1.6 --- cgen/rtl-c.scm 2 Aug 2005 19:25:38 -0000 *************** *** 1,5 **** ; RTL->C translation support. ! ; Copyright (C) 2000 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. --- 1,5 ---- ; RTL->C translation support. ! ; Copyright (C) 2000, 2005 Red Hat, Inc. ; This file is part of CGEN. ; See file COPYING.CGEN for details. *************** *** 649,658 **** (if (-rtx-use-sem-fn? estate c-op mode) (if (mode-float? mode) (cx:make sem-mode ! (string-append "(* CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase name) (string-downcase (obj:str-name sem-mode)) ! ") (CGEN_CPU_FPU (current_cpu), " (cx:c val) ")")) (cx:make sem-mode (string-append name (obj:str-name sem-mode) --- 649,658 ---- (if (-rtx-use-sem-fn? estate c-op mode) (if (mode-float? mode) (cx:make sem-mode ! (string-append "CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase name) (string-downcase (obj:str-name sem-mode)) ! " (CGEN_CPU_FPU (current_cpu), " (cx:c val) ")")) (cx:make sem-mode (string-append name (obj:str-name sem-mode) *************** *** 684,693 **** (if (-rtx-use-sem-fn? estate c-op mode) (if (mode-float? mode) (cx:make sem-mode ! (string-append "(* CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase name) (string-downcase (obj:str-name sem-mode)) ! ") (CGEN_CPU_FPU (current_cpu), " (cx:c val1) ", " (cx:c val2) ")")) (cx:make sem-mode --- 684,693 ---- (if (-rtx-use-sem-fn? estate c-op mode) (if (mode-float? mode) (cx:make sem-mode ! (string-append "CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase name) (string-downcase (obj:str-name sem-mode)) ! " (CGEN_CPU_FPU (current_cpu), " (cx:c val1) ", " (cx:c val2) ")")) (cx:make sem-mode *************** *** 799,809 **** (if (or (mode-float? mode) (mode-float? (cx:mode s))) (cx:make mode ! (string-append "(* CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase name) (string-downcase (obj:str-name (-rtx-sem-mode (cx:mode s)))) (string-downcase (obj:str-name (-rtx-sem-mode mode))) ! ") (CGEN_CPU_FPU (current_cpu), " (cx:c s) ")")) (cx:make mode (string-append name --- 799,809 ---- (if (or (mode-float? mode) (mode-float? (cx:mode s))) (cx:make mode ! (string-append "CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase name) (string-downcase (obj:str-name (-rtx-sem-mode (cx:mode s)))) (string-downcase (obj:str-name (-rtx-sem-mode mode))) ! " (CGEN_CPU_FPU (current_cpu), " (cx:c s) ")")) (cx:make mode (string-append name *************** *** 829,838 **** (if (-rtx-use-sem-fn? estate c-op mode) (if (mode-float? mode) (cx:make (mode:lookup 'BI) ! (string-append "(* CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase (symbol->string name)) (string-downcase (obj:str-name (-rtx-sem-mode mode))) ! ") (CGEN_CPU_FPU (current_cpu), " (cx:c val1) ", " (cx:c val2) ")")) (cx:make (mode:lookup 'BI) --- 829,838 ---- (if (-rtx-use-sem-fn? estate c-op mode) (if (mode-float? mode) (cx:make (mode:lookup 'BI) ! (string-append "CGEN_CPU_FPU (current_cpu)->ops->" (string-downcase (symbol->string name)) (string-downcase (obj:str-name (-rtx-sem-mode mode))) ! " (CGEN_CPU_FPU (current_cpu), " (cx:c val1) ", " (cx:c val2) ")")) (cx:make (mode:lookup 'BI) --------------080702090403090300090607--