* [commit] Add some rtl operations to SID
@ 2005-02-16 21:23 Dave Brolley
0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2005-02-16 21:23 UTC (permalink / raw)
To: sid, cgen
[-- Attachment #1: Type: text/plain, Size: 112 bytes --]
Hi,
I've committed the attached patch which adds some operations that were
needed by an internal port.
Dave
[-- Attachment #2: sid-ops.ChangeLog --]
[-- Type: text/plain, Size: 138 bytes --]
2005-02-16 Dave Brolley <brolley@redhat.com>
* cgen-ops.h (RUNCBIBI): New macro.
(ADDOFQI): New function.
(SUBOFQI): New function.
[-- Attachment #3: sid-ops.patch.txt --]
[-- Type: text/plain, Size: 1332 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.11
diff -c -p -r1.11 cgen-ops.h
*** sid/component/cgen-cpu/cgen-ops.h 13 Jun 2003 19:58:08 -0000 1.11
--- sid/component/cgen-cpu/cgen-ops.h 16 Feb 2005 21:15:43 -0000
*************** namespace cgen {
*** 251,256 ****
--- 251,257 ----
#define ZEXTSIDI(x) ((DI) (USI) (x))
#define ZEXTDIDI(x) ((UDI) (x))
+ #define TRUNCBIBI(x) ((BI) (x))
#define TRUNCQIBI(x) ((BI) (QI) (x))
#define TRUNCQIQI(x) ((QI) (x))
#define TRUNCHIBI(x) ((BI) (HI) (x))
*************** ADDCFDI (DI a, DI b, BI c)
*** 407,412 ****
--- 408,422 ----
}
inline BI
+ ADDOFQI (QI a, QI b, BI c)
+ {
+ QI tmp = ADDQI (a, ADDQI (b, c));
+ BI res = (((a < 0) == (b < 0))
+ && ((a < 0) != (tmp < 0)));
+ return res;
+ }
+
+ inline BI
ADDOFHI (HI a, HI b, BI c)
{
HI tmp = ADDHI (a, ADDHI (b, c));
*************** SUBCFSI (SI a, SI b, BI c)
*** 477,482 ****
--- 487,501 ----
}
inline BI
+ SUBOFQI (QI a, QI b, BI c)
+ {
+ QI tmp = SUBQI (a, ADDQI (b, c));
+ BI res = (((a < 0) != (b < 0))
+ && ((a < 0) != (tmp < 0)));
+ return res;
+ }
+
+ inline BI
SUBOFHI (HI a, HI b, BI c)
{
HI tmp = SUBHI (a, ADDHI (b, c));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-02-16 21:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-16 21:23 [commit] Add some rtl operations to SID Dave Brolley
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).