summaryrefslogtreecommitdiff
path: root/sim/common/sim-endian.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-10-28 07:10:36 +0000
committerAndrew Cagney <cagney@redhat.com>1997-10-28 07:10:36 +0000
commit89d0973831b0930f621b6a5e666760dc1b684ed6 (patch)
treeaeaf421b01cede9545fd16def02fbb43791cfbbe /sim/common/sim-endian.h
parent336ffb472ff4360cb127149e9517abf51b123e04 (diff)
downloadbinutils-gdb-89d0973831b0930f621b6a5e666760dc1b684ed6.tar.gz
Add support for 16 byte quantities to sim-endian macro H2T.
Add model-filter field to option, include, model anf function igen records
Diffstat (limited to 'sim/common/sim-endian.h')
-rw-r--r--sim/common/sim-endian.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/sim/common/sim-endian.h b/sim/common/sim-endian.h
index 1dca5e7a3f8..5efba30e844 100644
--- a/sim/common/sim-endian.h
+++ b/sim/common/sim-endian.h
@@ -133,12 +133,13 @@ INLINE_SIM_ENDIAN(void*) offset_16(unsigned_16 *x, unsigned ws, unsigned w);
#define H2T(VARIABLE) \
do { \
- switch (sizeof(VARIABLE)) { \
- case 1: VARIABLE = H2T_1(VARIABLE); break; \
- case 2: VARIABLE = H2T_2(VARIABLE); break; \
- case 4: VARIABLE = H2T_4(VARIABLE); break; \
- case 8: VARIABLE = H2T_8(VARIABLE); break; \
- /*case 16: VARIABLE = H2T_16(VARIABLE); break;*/ \
+ void *vp = &(VARIABLE); \
+ switch (sizeof (VARIABLE)) { \
+ case 1: *(unsigned_1*)vp = H2T_1(*(unsigned_1*)vp); break; \
+ case 2: *(unsigned_2*)vp = H2T_2(*(unsigned_2*)vp); break; \
+ case 4: *(unsigned_4*)vp = H2T_4(*(unsigned_4*)vp); break; \
+ case 8: *(unsigned_8*)vp = H2T_8(*(unsigned_8*)vp); break; \
+ case 16: *(unsigned_16*)vp = H2T_16(*(unsigned_16*)vp); break; \
} \
} while (0)