From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch][commit] Additional cgen ops
Date: Thu, 11 May 2006 14:38:00 -0000 [thread overview]
Message-ID: <44634C55.5000600@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
Hi,
I've committed the attached patch which implements the cgen ops
SUBWORDDIHI, SUBWORDDIQI and SUBWORDDFDI. The patch also initializes the
existing member cgen_bi_endian_cpu::branch_was_return in the constructor.
Dave
[-- Attachment #2: sid-ops.ChangeLog --]
[-- Type: text/plain, Size: 187 bytes --]
2006-05-11 Dave Brolley <brolley@redhat.com>
* cgen-ops.h (SUBWORDDIHI, SUBWORDDIQI, SUBWORDDFDI): New functions.
* compCGEN.cxx (cgen_bi_endian_cpu): Initialize branch_was_return.
[-- Attachment #3: sid-ops.patch.txt --]
[-- Type: text/plain, Size: 2670 bytes --]
Index: sid/component/cgen-cpu/cgen-ops.h
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/cgen-ops.h,v
retrieving revision 1.12
diff -c -p -r1.12 cgen-ops.h
*** sid/component/cgen-cpu/cgen-ops.h 16 Feb 2005 21:19:34 -0000 1.12
--- sid/component/cgen-cpu/cgen-ops.h 11 May 2006 14:31:27 -0000
***************
*** 1,6 ****
// cgen-ops.h - CGEN semantic ops. -*- C++ -*-
! // Copyright (C) 1999, 2000, 2002 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
--- 1,6 ----
// cgen-ops.h - CGEN semantic ops. -*- C++ -*-
! // Copyright (C) 1999, 2000, 2002, 2006 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
*************** SUBWORDDIDF (DI in)
*** 560,565 ****
--- 560,587 ----
return *out;
}
+ inline HI
+ SUBWORDDIHI (DI in, int word)
+ {
+ assert (word >= 0 && word <= 3);
+ return (UHI) (in >> (16 * (3 - word))) & 0xFFFF;
+ }
+
+ inline QI
+ SUBWORDDIQI (DI in, int byte)
+ {
+ assert (byte >= 0 && byte <= 7);
+ return (UQI) (in >> (8 * (7 - byte))) & 0xFF;
+ }
+
+ inline DI
+ SUBWORDDFDI (DF in)
+ {
+ union { DF in; DI out; } x;
+ x.in = in;
+ return x.out;
+ }
+
inline SI
SUBWORDDFSI (DF in, int word)
{
Index: sid/component/cgen-cpu/compCGEN.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/compCGEN.cxx,v
retrieving revision 1.17
diff -c -p -r1.17 compCGEN.cxx
*** sid/component/cgen-cpu/compCGEN.cxx 1 Mar 2006 21:07:00 -0000 1.17
--- sid/component/cgen-cpu/compCGEN.cxx 11 May 2006 14:31:27 -0000
***************
*** 1,6 ****
// compCGEN.cxx - CPU components. -*- C++ -*-
! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
--- 1,6 ----
// compCGEN.cxx - CPU components. -*- C++ -*-
! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
*************** using namespace cgen;
*** 42,47 ****
--- 42,48 ----
// ----------------------------------------------------------------------------
cgen_bi_endian_cpu::cgen_bi_endian_cpu ()
{
+ branch_was_return = false;
warnings_enabled = false;
add_attribute ("enable-warnings?", & warnings_enabled, "setting");
this->engine_type = ENGINE_UNKNOWN;
reply other threads:[~2006-05-11 14:38 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=44634C55.5000600@redhat.com \
--to=brolley@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).