wrong byte swap windows xp pro x64 (amd)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Fix Released
|
Wishlist
|
Jeff Hill |
Bug Description
From Chris Timossi,
You're right, adding the _M_AMD64 fixed the problem. Thanks. Here's the
diff:
Q:\MKS\mksnt>diff T:\epics\
T:\epics\
30c30
< #if defined (_M_IX86) || defined (_X86_) || defined (__i386__) ||
defined(_armv4l_) || defined (_X86_64_) || defined (_M_AMD64)
---
> #if defined (_M_IX86) || defined (_X86_) || defined (__i386__) ||
defined(_armv4l_) || defined (_X86_64_)
Chris
Jeff Hill wrote:
> Hey Chris,
>
> The attached code in base\src\
> trouble.
>
> We probably need to add both (little endian active if either are set)
> _M_IA64 and _M_AMD64 to the conditional below. Please try installing
> that type of fix and let me know if that worked (send the diffs).
>
> PS: We definitely need to reorganize this part of the source so that
> there is less likelihood of needing to maintain this type of switch.
>
> PPS: Its amazing that no one has found this before you.
>
> Thanks,
>
> Jeff
>
> /*
> * Here are the definitions for architecture dependent byte ordering
> * and floating point format
> */
> #if defined (_M_IX86) || defined (_X86_) || defined (__i386__) ||
> defined(_armv4l_) || defined (_X86_64_)
> # define CA_FLOAT_IEEE
> # define CA_LITTLE_ENDIAN
> #elif defined (VAX)
> # define CA_FLOAT_MIT
> # define CA_LITTLE_ENDIAN
> #elif ( defined (__ALPHA) || defined (__alpha) ) && ( defined (VMS) ||
> defined (__VMS) )
> # define CA_FLOAT_MIT
> # define CA_LITTLE_ENDIAN
> #elif ( defined (__ALPHA) || defined (__alpha) ) && defined (UNIX)
> # define CA_FLOAT_IEEE
> # define CA_LITTLE_ENDIAN
> #else
> # define CA_FLOAT_IEEE
> # define CA_BIG_ENDIAN
> #endif
>
>
>> -----Original Message-----
>> From: Chris Timossi
>> Sent: Thursday, April 20, 2006 10:13 AM
>> To: Jeff Hill
>> Subject: windows xp pro x64 (amd)
>>
>> Hey Jeff,
>>
>> I'm playing around with building CA for x64 build for Windows XP Pro
>> x64 on an AMD processor.
>>
>> I built 3.14.8.2 with VS 2005 and it seems that when I run caget it
>> returns a value that's been byte swapped. Any ideas where I should look?
>>
>> For example, if I get the sample pv that simply counts from 0-9, I
>> see the right value for dbr_char (and string) but the other formats
>> are
>>
> wrong:
>
>> T:\epics\
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected
>> timossi:aiExample 3.03865e-319
>> currentTime:
>> detected
>> currentTime:
>> detected
>>
>>
>> T:\epics\
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected timossi:aiExample
>> Data type: DBR_CHAR (native: DBF_DOUBLE)
>> Element count: 1
>> Value: 7
>> currentTime:
>> detected
>> currentTime:
>> detected
>> currentTime:
>> detected
>>
>
Original Mantis Bug: mantis-261
http://
fixed in R3.14.9