EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Problem with short integet on Intel
From: Mark Rivers <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Sat, 5 Sep 1998 9:38:36 -0500
Folks,

As was pointed out the other day, there is a problem with channel access 
reading short integers on Intel platforms. Until Jeff Hill has a chance to 
check in his patch for the problem here is a fix I have come up with.  The
source of the problem is that the ">>" operator is doing sign extension on
Intel systems, while it does not on other little-endian architectures like DEC
Alpha.  The problem is in base/src/ca/net_convert.h

corvette> diff net_convert.h net_convert.h_orig
23d22
<  *      mlr     09-03-98        Fixed problems with short ints
111c110
<       ((((SHORT) & (dbr_short_t) 0xff00) >> 8) & (dbr_short_t) 0x00ff) ) )
---
>       ((SHORT) & (dbr_short_t) 0xff00) >> 8) )
117c116
<       ((((SHORT) & (dbr_short_t) 0xff00) >> 8) & (dbr_short_t) 0x00ff) ) )
---
>       ((SHORT) & (dbr_short_t) 0xff00) >> 8) )
133c132
<               ( ((((dbr_ulong_t)LONG) & 0xff000000 ) >> 24u) & (dbr_short_t)
0x00ff) |\
---
>               ( ((dbr_ulong_t)LONG) & 0xff000000 ) >> 24u |\
143c142
<               ( ((((dbr_ulong_t)LONG) & 0xff000000 ) >> 24u) & (dbr_short_t)
0x00ff) |\
---
>               ( ((dbr_ulong_t)(LONG)) & 0xff000000 ) >> 24u |\


                                   Mark Rivers

Navigate by Date:
Prev: Two COMP record questions. Ron Chestnut
Next: Display Managers john sinclair
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Two COMP record questions. Ron Chestnut
Next: Display Managers john sinclair
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·