Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: 64 bit integers (aka. long or long long)
From: Andrew Johnson <anj@aps.anl.gov>
To: core-talk@aps.anl.gov, mdavidsaver@bnl.gov
Date: Fri, 17 Jun 2011 17:31:05 -0500
Hi Michael,

On 2011-06-17 Michael Davidsaver wrote:
> I'd like to add a standard 64-bit integer type to epicsTypes.h.
> Currently this is only available when compiling with the C99 extensions
> enabled.
> 
> Attached are two proposed patches.  The first adds sanity checks of the
> existing type sizes.  The second defines epicsUInt64 and epicsInt64.
> 
> The C primitive used (either long or long long) is chosen by testing the
> size of LONG_MAX.  I think this should work for all toolchains which
> actually provide a 64-bit integer type.  The question is, are there any
> which don't and need to be supported?

There were issues with using long long on some vxWorks versions/architectures, 
although from what I can see they were only in vxWorks 5.3.x releases and the 
later releases apparently do provide full support.  I believe there were some 
support routines that gcc calls implicitly which the OS relegated to an 
external libgcc.a library rather than building them into the OS image.

I would suggest moving your verification code into libCom/test and adding a 
test program to the file that exercises the basic operations +-*/&|^~ with the 
epicsInt64 and epicsUInt64 types to ensure they are all implemented.  The 
tests in libCom/test are intended to help us confirm that the OS properly 
implements all the facilities we need/expect.

Are you looking for this in 3.14.x or 3.15?

- Andrew
-- 
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham

Replies:
Re: 64 bit integers (aka. long or long long) Michael Davidsaver
Re: 64 bit integers (aka. long or long long) Benjamin Franksen
References:
64 bit integers (aka. long or long long) Michael Davidsaver

Navigate by Date:
Prev: 64 bit integers (aka. long or long long) Michael Davidsaver
Next: Re: 64 bit integers (aka. long or long long) Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: 64 bit integers (aka. long or long long) Michael Davidsaver
Next: Re: 64 bit integers (aka. long or long long) Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·