aboutsummaryrefslogtreecommitdiff
path: root/sim/common
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
parent336ffb472ff4360cb127149e9517abf51b123e04 (diff)
downloadgdb-89d0973831b0930f621b6a5e666760dc1b684ed6.zip
gdb-89d0973831b0930f621b6a5e666760dc1b684ed6.tar.gz
gdb-89d0973831b0930f621b6a5e666760dc1b684ed6.tar.bz2
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')
-rw-r--r--sim/common/ChangeLog5
-rw-r--r--sim/common/sim-endian.h13
-rw-r--r--sim/common/sim-n-core.h5
3 files changed, 17 insertions, 6 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 2694cd8..1bf1dcc 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,10 @@
Tue Oct 28 12:29:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
+ * sim-endian.h (H2T): Handle 16 byte variables.
+
+ * sim-n-core.h (sim_core_read_unaligned_N): Return a dummy when an
+ error.
+
* sim-core.c: Do not generate sim_core_*_word.
* sim-n-core.h (sim_core_trace_N): Add line_nr argument.
diff --git a/sim/common/sim-endian.h b/sim/common/sim-endian.h
index 1dca5e7..5efba30 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)
diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h
index 0184b1d..b7bc631 100644
--- a/sim/common/sim-n-core.h
+++ b/sim/common/sim-n-core.h
@@ -178,6 +178,11 @@ sim_core_read_unaligned_N(sim_cpu *cpu,
sim_engine_abort (CPU_STATE (cpu), cpu, cia,
"internal error - %s - bad switch",
XSTRING (sim_core_read_unaligned_N));
+ /* to keep some compilers happy, we return a dummy */
+ {
+ unsigned_N val[1] = { };
+ return val[0];
+ }
}
}