EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Re: 64 bit integers (aka. long or long long)
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Mon, 20 Jun 2011 17:35:15 -0500
Hi Michael,

On 2011-06-18 Michael Davidsaver wrote:
> > 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.
> 
> Does sizeof(long)==8 in these cases?  If it does then there is no need
> for long long.

Nope, 4 [when dealing with Wind River you need to be pessimistic, they've only 
just started supporting SMP and LP64 in vxWorks 6.9 for some Intel x86_64 
CPUs].

> My reason for not wanting to put these tests in libCom/test is that they
> are most useful when compiled before everything else.  These checks are
> the sort usually found in autoconf ./configure scripts.
> 
> I was tempted to put them into epicsTypes.h directly.

I see your point (fail fast), but I'm not sure that matters as much for us as 
it does for other software [maybe it should and I'm thinking too small, but I 
don't really see us speeding up porting such that we could use a ./configure 
script without quite a lot of work].  I'd rather not have those checks in 
epicsTypes.h given how much that file gets used compared with how often they 
are expected to fail.

I do want to see the basic operations on 64-bit integers checked though, Ben's 
experience shows that they aren't guaranteed, although I think vxWorks 5.5.x 
does have the necessary routines included.

> > Are you looking for this in 3.14.x or 3.15?
> 
> Certainly 3.15.
> 
> I would also like to see it added to 3.14, if this can be done without
> breaking compatibility with old vxWorks versions.  It is really up to
> you to decide if this can be done.

I think this really is 3.15 material.

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

References:
64 bit integers (aka. long or long long) Michael Davidsaver
Re: 64 bit integers (aka. long or long long) Andrew Johnson
Re: 64 bit integers (aka. long or long long) Michael Davidsaver

Navigate by Date:
Prev: Re: 64 bit integers (aka. long or long long) Benjamin Franksen
Next: epicsThreadExitMain in softIoc program Benjamin Franksen
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: 64 bit integers (aka. long or long long) Michael Davidsaver
Next: Re: 64 bit integers (aka. long or long long) Benjamin Franksen
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024