* [RFA:] sim/cgen-ops.h: Add ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI
@ 2002-02-01 5:01 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2002-02-01 5:01 UTC (permalink / raw)
To: cgen, sid
I thought this was supposed to go to gdb, but I got no reaction
there and I see a recent patch went to cgen & sid, hence
forwarded.
------- Start of forwarded message -------
Return-Path: <hp@axis.com>
Date: Tue, 29 Jan 2002 00:05:08 +0100
From: Hans-Peter Nilsson <hp@axis.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA:] sim/cgen-ops.h: Add ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI
These functions looked missing. At least I get undefined
references to these for a CGEN port in progress, and they look
like they *should* be there. CCNOL (CC me; I'm not on this
list), please.
Ok to commit?
2002-01-28 Hans-Peter Nilsson <hp@axis.com>
* cgen-ops.h (ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI):
New functions.
Index: cgen-ops.h
===================================================================
RCS file: /cvs/src/src/sim/common/cgen-ops.h,v
retrieving revision 1.5
diff -p -c -r1.5 cgen-ops.h
*** cgen-ops.h 2000/12/11 07:14:34 1.5
- --- cgen-ops.h 2002/01/28 22:47:37
***************
*** 1,5 ****
/* Semantics ops support for CGEN-based simulators.
! Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the GNU Simulators.
- --- 1,5 ----
/* Semantics ops support for CGEN-based simulators.
! Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the GNU Simulators.
*************** SUBOFHI (HI a, HI b, BI c)
*** 581,586 ****
- --- 581,633 ----
return res;
}
+ SEMOPS_INLINE QI
+ ADDCQI (QI a, QI b, BI c)
+ {
+ QI res = ADDQI (a, ADDQI (b, c));
+ return res;
+ }
+
+ SEMOPS_INLINE BI
+ ADDCFQI (QI a, QI b, BI c)
+ {
+ QI tmp = ADDQI (a, ADDQI (b, c));
+ BI res = ((UQI) tmp < (UQI) a) || (c && tmp == a);
+ return res;
+ }
+
+ SEMOPS_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;
+ }
+
+ SEMOPS_INLINE QI
+ SUBCQI (QI a, QI b, BI c)
+ {
+ QI res = SUBQI (a, ADDQI (b, c));
+ return res;
+ }
+
+ SEMOPS_INLINE BI
+ SUBCFQI (QI a, QI b, BI c)
+ {
+ BI res = ((UQI) a < (UQI) b) || (c && a == b);
+ return res;
+ }
+
+ SEMOPS_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;
+ }
+
#else
SI ADDCSI (SI, SI, BI);
*************** UBI ADDOFHI (HI, HI, BI);
*** 595,600 ****
- --- 642,653 ----
HI SUBCHI (HI, HI, BI);
UBI SUBCFHI (HI, HI, BI);
UBI SUBOFHI (HI, HI, BI);
+ QI ADDCQI (QI, QI, BI);
+ UBI ADDCFQI (QI, QI, BI);
+ UBI ADDOFQI (QI, QI, BI);
+ QI SUBCQI (QI, QI, BI);
+ UBI SUBCFQI (QI, QI, BI);
+ UBI SUBOFQI (QI, QI, BI);
#endif
brgds, H-P
------- End of forwarded message -------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-02-01 13:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-01 5:01 [RFA:] sim/cgen-ops.h: Add ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI Hans-Peter Nilsson
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).