From: Dave Brolley <brolley@redhat.com>
To: cgen@sources.redhat.com, sid@sources.redhat.com
Subject: [patch][commit] Floating Point Support for SID
Date: Tue, 02 Aug 2005 19:35:00 -0000 [thread overview]
Message-ID: <42EFCAF2.1070602@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 448 bytes --]
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
[-- Attachment #2: cgen-fp.sources.ChangeLog --]
[-- Type: text/plain, Size: 194 bytes --]
2005-08-02 Dave Brolley <brolley@redhat.com>
* 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.
[-- Attachment #3: cgen-fp.sources.patch.txt --]
[-- Type: text/plain, Size: 4014 bytes --]
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)
reply other threads:[~2005-08-02 19:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42EFCAF2.1070602@redhat.com \
--to=brolley@redhat.com \
--cc=cgen@sources.redhat.com \
--cc=sid@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).