From: Ben Elliston <bje@redhat.com>
To: sid@sources.redhat.com
Cc: cgen@sources.redhat.com
Subject: [RFA] New SUBWORD* functions for SID CPUs
Date: Thu, 31 Jan 2002 04:28:00 -0000 [thread overview]
Message-ID: <15449.14439.853756.277945@scooby.brisbane.redhat.com> (raw)
The following patch adds a number of new mode conversion functions for
SID CPU components. Some, such as SUBWORDSISF, simply perform
coercion between modes. Okay to commit?
Ben
2002-01-31 Ben Elliston <bje@redhat.com>
* cgen-ops.h (SUBWORDSIQI): New.
(SUBWORDSIHI): Ditto.
(SUBWORDSFSI): Ditto.
(SUBWORDSISF): Ditto.
(SUBWORDDIDF): Ditto.
(SUBWORDDFSI): Ditto.
(SUBWORDSIUQI): Ditto.
Index: cgen-ops.h
===================================================================
RCS file: /cvs/cvsfiles/devo/sid/component/cgen-cpu/cgen-ops.h,v
retrieving revision 1.21
diff -u -c -r1.21 cgen-ops.h
*** cgen-ops.h 2001/12/18 23:07:59 1.21
--- cgen-ops.h 2002/01/31 12:22:10
***************
*** 1,6 ****
// cgen-ops.h - CGEN semantic ops. -*- C++ -*-
! // Copyright (C) 1999, 2000 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 Red Hat.
// This file is part of SID and is licensed under the GPL.
// See the file COPYING.SID for conditions for redistribution.
***************
*** 503,508 ****
--- 503,559 ----
return res;
}
+ inline QI
+ SUBWORDSIQI (SI in, int byte)
+ {
+ assert (byte >= 0 && byte <= 3);
+ return static_cast<UQI> ((in >> (8 * (3 - byte))) & 0xFF);
+ }
+
+
+ inline HI
+ SUBWORDSIHI (SI in, int word)
+ {
+ if (word == 0)
+ return static_cast<USI> (in >> 16);
+ else
+ return in;
+ }
+
+ inline SI
+ SUBWORDSFSI (SF in)
+ {
+ SI out = in;
+ return out;
+ }
+
+ inline SF
+ SUBWORDSISF (SI in)
+ {
+ SF out = in;
+ return out;
+ }
+
+ inline DF
+ SUBWORDDIDF (DI in)
+ {
+ DF out = in;
+ return out;
+ }
+
+ inline SI
+ SUBWORDDFSI (DF in, int word)
+ {
+ DI di = in;
+ return SUBWORDDISI(di, word);
+ }
+
+ inline UQI
+ SUBWORDSIUQI (SI in, int byte)
+ {
+ assert (byte >= 0 && byte <= 7);
+ return static_cast<UQI> ((in >> (8 * (3 - byte))) & 0xFF);
+ }
} // namespace cgen
next reply other threads:[~2002-01-31 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-31 4:28 Ben Elliston [this message]
2002-01-31 4:35 ` Frank Ch. Eigler
2002-01-31 17:04 ` Ben Elliston
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=15449.14439.853756.277945@scooby.brisbane.redhat.com \
--to=bje@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).