732
732
#define float4get(V,M) do { *((float *) &(V)) = *((float*) (M)); } while(0)
733
733
#define float8get(V,M) doubleget((V),(M))
734
#define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float))
735
#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V),sizeof(float))
736
#define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float))
734
#define float4store(V,M) memcpy(V, (&M), sizeof(float))
735
#define floatstore(T,V) memcpy((T), (&V), sizeof(float))
736
#define floatget(V,M) memcpy(&V, (M), sizeof(float))
737
737
#define float8store(V,M) doublestore((V),(M))
846
846
((uchar*) &def_temp)[7]=(M)[0];\
847
847
(V) = def_temp; } while(0)
849
#define float4get(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float))
850
#define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float))
849
#define float4get(V,M) memcpy(&V, (M), sizeof(float))
850
#define float4store(V,M) memcpy(V, (&M), sizeof(float))
852
852
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
853
853
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\
917
917
*(((char*)T)+1)=(((A) >> 16));\
918
918
*(((char*)T)+0)=(((A) >> 24)); } while(0)
920
#define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M), sizeof(float))
921
#define floatstore(T,V) memcpy((uchar*) (T),(uchar*)(&V), sizeof(float))
922
#define doubleget(V,M) memcpy((uchar*) &V,(uchar*) (M), sizeof(double))
923
#define doublestore(T,V) memcpy((uchar*) (T),(uchar*) &V, sizeof(double))
924
#define int64_tget(V,M) memcpy((uchar*) &V,(uchar*) (M), sizeof(uint64_t))
925
#define int64_tstore(T,V) memcpy((uchar*) (T),(uchar*) &V, sizeof(uint64_t))
920
#define floatget(V,M) memcpy(&V, (M), sizeof(float))
921
#define floatstore(T, V) memcpy((T), (&V), sizeof(float))
922
#define doubleget(V, M) memcpy(&V, (M), sizeof(double))
923
#define doublestore(T, V) memcpy((T), &V, sizeof(double))
924
#define int64_tget(V, M) memcpy(&V, (M), sizeof(uint64_t))
925
#define int64_tstore(T, V) memcpy((T), &V, sizeof(uint64_t))
933
933
#define shortstore(T,V) int2store(T,V)
934
934
#define longstore(T,V) int4store(T,V)
935
935
#ifndef floatstore
936
#define floatstore(T,V) memcpy((uchar*) (T),(uchar*) (&V),sizeof(float))
937
#define floatget(V,M) memcpy((uchar*) &V, (uchar*) (M), sizeof(float))
936
#define floatstore(T,V) memcpy((T), (&V), sizeof(float))
937
#define floatget(V,M) memcpy(&V, (M), sizeof(float))
939
939
#ifndef doubleget
940
#define doubleget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(double))
941
#define doublestore(T,V) memcpy((uchar*) (T),(uchar*) &V,sizeof(double))
940
#define doubleget(V, M) memcpy(&V, (M), sizeof(double))
941
#define doublestore(T,V) memcpy((T), &V, sizeof(double))
942
942
#endif /* doubleget */
943
#define int64_tget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(uint64_t))
944
#define int64_tstore(T,V) memcpy((uchar*) (T),(uchar*) &V,sizeof(uint64_t))
943
#define int64_tget(V,M) memcpy(&V, (M), sizeof(uint64_t))
944
#define int64_tstore(T,V) memcpy((T), &V, sizeof(uint64_t))
946
946
#endif /* WORDS_BIGENDIAN */