From 89d0973831b0930f621b6a5e666760dc1b684ed6 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 28 Oct 1997 07:10:36 +0000 Subject: Add support for 16 byte quantities to sim-endian macro H2T. Add model-filter field to option, include, model anf function igen records --- sim/common/sim-endian.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sim/common/sim-endian.h') 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) -- cgit v1.2.1