X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fsim-n-core.h;h=0c1cb7af438f536cd6307eb956ef25f6a2118837;hb=1ac72f0659d64d6a14da862242db0d841d2878d0;hp=10dc27de71394e32d71042f3eef992443c010e6a;hpb=c5a570810022466eaa5e077cd1b8aa00d74706f1;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h index 10dc27de71..0c1cb7af43 100644 --- a/sim/common/sim-n-core.h +++ b/sim/common/sim-n-core.h @@ -1,6 +1,6 @@ /* The common simulator framework for GDB, the GNU Debugger. - Copyright 2002, 2007-2012 Free Software Foundation, Inc. + Copyright 2002-2016 Free Software Foundation, Inc. Contributed by Andrew Cagney and Red Hat. @@ -164,19 +164,8 @@ sim_core_read_aligned_N(sim_cpu *cpu, mapping = sim_core_find_mapping (core, map, addr, N, read_transfer, 1 /*abort*/, cpu, cia); do { -#if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) - { - unsigned_M data; - if (device_io_read_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N) - device_error (mapping->device, "internal error - %s - io_read_buffer should not fail", - XSTRING (sim_core_read_aligned_N)); - val = T2H_M (data); - break; - } -#endif #if (WITH_HW) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) + if (mapping->device != NULL) { unsigned_M data; sim_cpu_hw_io_read_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N); @@ -261,7 +250,7 @@ sim_core_read_misaligned_N(sim_cpu *cpu, read_transfer, sim_core_unaligned_signal); if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER) val = SWAP_M (val); - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) val >>= (M - N) * 8; PROFILE_COUNT_CORE (cpu, addr, N, map); if (TRACE_P (cpu, TRACE_CORE_IDX)) @@ -295,18 +284,8 @@ sim_core_write_aligned_N(sim_cpu *cpu, mapping = sim_core_find_mapping (core, map, addr, N, write_transfer, 1 /*abort*/, cpu, cia); do { -#if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) - { - unsigned_M data = H2T_M (val); - if (device_io_write_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N) - device_error (mapping->device, "internal error - %s - io_write_buffer should not fail", - XSTRING (sim_core_write_aligned_N)); - break; - } -#endif #if (WITH_HW) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) + if (mapping->device != NULL) { unsigned_M data = H2T_M (val); sim_cpu_hw_io_write_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N); @@ -387,7 +366,7 @@ sim_core_write_misaligned_N(sim_cpu *cpu, unsigned_M val) { unsigned_M data = val; - if (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN) + if (CURRENT_TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) data <<= (M - N) * 8; if (CURRENT_HOST_BYTE_ORDER != CURRENT_TARGET_BYTE_ORDER) data = SWAP_M (data);