summaryrefslogtreecommitdiff
path: root/sim/common/sim-n-core.h
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-09-02 21:58:58 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-09-02 21:58:58 +0000
commit74db699d1d97eeb12f7f23c1ab1caa85f00a9d72 (patch)
treed1e8a299ce6d3f196ac646abc4836ebdaf52cadf /sim/common/sim-n-core.h
parentbbce7567b651bbbb58d239a006b00d938ee666f7 (diff)
downloadbinutils-gdb-74db699d1d97eeb12f7f23c1ab1caa85f00a9d72.tar.gz
* Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker.
* sim-n-bits.h: Add TAGS comments for all functions. * sim-n-core.h: Likewise. * sim-n-endian.h: Likewise.
Diffstat (limited to 'sim/common/sim-n-core.h')
-rw-r--r--sim/common/sim-n-core.h63
1 files changed, 49 insertions, 14 deletions
diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h
index 614a32f5a8d..4aefd2df0d1 100644
--- a/sim/common/sim-n-core.h
+++ b/sim/common/sim-n-core.h
@@ -35,6 +35,9 @@
#define sim_core_read_unaligned_N XCONCAT2(sim_core_read_unaligned_,N)
#define sim_core_write_unaligned_N XCONCAT2(sim_core_write_unaligned_,N)
+/* TAGS: sim_core_read_aligned_1 sim_core_read_aligned_2 */
+/* TAGS: sim_core_read_aligned_4 sim_core_read_aligned_8 */
+/* TAGS: sim_core_read_aligned_word */
INLINE_SIM_CORE(unsigned_N)
sim_core_read_aligned_N(sim_cpu *cpu,
@@ -72,16 +75,30 @@ sim_core_read_aligned_N(sim_cpu *cpu,
#endif
val = T2H_N (*(unsigned_N*) sim_core_translate (mapping, addr));
if (TRACE_P (cpu, TRACE_CORE_IDX))
- trace_printf (CPU_STATE (cpu), cpu,
- "sim-n-core.c:%d: read-%d %s:0x%08lx -> 0x%lx\n",
- __LINE__,
- sizeof (unsigned_N),
- sim_core_map_to_str (map),
- (unsigned long) addr,
- (unsigned long) val);
+ if (sizeof (unsigned_N) > 4)
+ trace_printf (CPU_STATE (cpu), cpu,
+ "sim-n-core.c:%d: read-%d %s:0x%08lx -> 0x%08lx%08lx\n",
+ __LINE__,
+ sizeof (unsigned_N),
+ sim_core_map_to_str (map),
+ (unsigned long) addr,
+ (unsigned long) (((unsigned64)(val)) >> 32),
+ (unsigned long) val);
+ else
+ trace_printf (CPU_STATE (cpu), cpu,
+ "sim-n-core.c:%d: read-%d %s:0x%08lx -> 0x%0*lx\n",
+ __LINE__,
+ sizeof (unsigned_N),
+ sim_core_map_to_str (map),
+ (unsigned long) addr,
+ sizeof (unsigned_N) * 2,
+ (unsigned long) val);
return val;
}
+/* TAGS: sim_core_read_unaligned_1 sim_core_read_unaligned_2 */
+/* TAGS: sim_core_read_unaligned_4 sim_core_read_unaligned_8 */
+/* TAGS: sim_core_read_unaligned_word */
INLINE_SIM_CORE(unsigned_N)
sim_core_read_unaligned_N(sim_cpu *cpu,
@@ -130,6 +147,9 @@ sim_core_read_unaligned_N(sim_cpu *cpu,
}
}
+/* TAGS: sim_core_write_aligned_1 sim_core_write_aligned_2 */
+/* TAGS: sim_core_write_aligned_4 sim_core_write_aligned_8 */
+/* TAGS: sim_core_write_aligned_word */
INLINE_SIM_CORE(void)
sim_core_write_aligned_N(sim_cpu *cpu,
@@ -168,15 +188,29 @@ sim_core_write_aligned_N(sim_cpu *cpu,
#endif
*(unsigned_N*) sim_core_translate (mapping, addr) = H2T_N (val);
if (TRACE_P (cpu, TRACE_CORE_IDX))
- trace_printf (CPU_STATE (cpu), cpu,
- "sim-n-core.c:%d: write-%d %s:0x%08lx <- 0x%lx\n",
- __LINE__,
- sizeof (unsigned_N),
- sim_core_map_to_str (map),
- (unsigned long) addr,
- (unsigned long) val);
+ if (sizeof (unsigned_N) > 4)
+ trace_printf (CPU_STATE (cpu), cpu,
+ "sim-n-core.c:%d: write-%d %s:0x%08lx <- 0x%08lx%08lx\n",
+ __LINE__,
+ sizeof (unsigned_N),
+ sim_core_map_to_str (map),
+ (unsigned long) addr,
+ (unsigned long) (((unsigned64)(val)) >> 32),
+ (unsigned long) val);
+ else
+ trace_printf (CPU_STATE (cpu), cpu,
+ "sim-n-core.c:%d: write-%d %s:0x%08lx <- 0x%0*lx\n",
+ __LINE__,
+ sizeof (unsigned_N),
+ sim_core_map_to_str (map),
+ (unsigned long) addr,
+ sizeof (unsigned_N) * 2,
+ (unsigned long) val);
}
+/* TAGS: sim_core_write_unaligned_1 sim_core_write_unaligned_2 */
+/* TAGS: sim_core_write_unaligned_4 sim_core_write_unaligned_8 */
+/* TAGS: sim_core_write_unaligned_word */
INLINE_SIM_CORE(void)
sim_core_write_unaligned_N(sim_cpu *cpu,
@@ -212,6 +246,7 @@ sim_core_write_unaligned_N(sim_cpu *cpu,
}
case FORCED_ALIGNMENT:
sim_core_write_aligned_N (cpu, cia, map, addr & ~alignment, val);
+ break;
case MIXED_ALIGNMENT:
sim_engine_abort (CPU_STATE (cpu), cpu, cia,
"internal error - %s - mixed alignment",