7 #ifdef WORDS_LITTEENDIAN
9 #define WSAACHAR(s,v) \
11 uint8_t _wsb_v = (v); \
12 saa_wbytes(s, &_wsb_v, 1); \
15 #define WSAASHORT(s,v) \
17 uint16_t _wss_v = (v); \
18 saa_wbytes(s, &_wss_v, 2); \
21 #define WSAALONG(s,v) \
23 uint32_t _wsl_v = (v); \
24 saa_wbytes(s, &_wsl_v, 4); \
27 #define WSAADLONG(s,v) \
29 uint64_t _wsq_v = (v); \
30 saa_wbytes(s, &_wsq_v, 8); \
33 #else /* !X86_MEMORY */
35 #define WSAACHAR(s,v) \
37 uint8_t _wsb_v = (v); \
38 saa_wbytes(s, &_wsb_v, 1); \
41 #define WSAASHORT(s,v) \
43 uint16_t _wss_v = (v); \
46 _wss_p[1] = _wss_v >> 8; \
47 saa_wbytes(s, _wss_p, 2); \
50 #define WSAALONG(s,v) \
52 uint32_t _wsl_v = (v); \
55 _wsl_p[1] = _wsl_v >> 8; \
56 _wsl_p[2] = _wsl_v >> 16; \
57 _wsl_p[3] = _wsl_v >> 24; \
58 saa_wbytes(s, _wsl_p, 4); \
61 #define WSAADLONG(s,v) \
63 uint64_t _wsq_v = (v); \
66 _wsq_p[1] = _wsq_v >> 8; \
67 _wsq_p[2] = _wsq_v >> 16; \
68 _wsq_p[3] = _wsq_v >> 24; \
69 _wsq_p[4] = _wsq_v >> 32; \
70 _wsq_p[5] = _wsq_v >> 40; \
71 _wsq_p[6] = _wsq_v >> 48; \
72 _wsq_p[7] = _wsq_v >> 56; \
73 saa_wbytes(s, _wsq_p, 8); \
78 #endif /* NASM_WSAA_H */