summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/arm/arm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/arm/arm.cpp')
-rw-r--r--src/devices/cpu/arm/arm.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp
index 1fba0a93f34..ab8dff26921 100644
--- a/src/devices/cpu/arm/arm.cpp
+++ b/src/devices/cpu/arm/arm.cpp
@@ -18,8 +18,8 @@
*/
#include "emu.h"
-#include "debugger.h"
#include "arm.h"
+#include "debugger.h"
CPU_DISASSEMBLE( arm );
CPU_DISASSEMBLE( arm_be );
@@ -224,32 +224,28 @@ enum
/***************************************************************************/
-const device_type ARM = device_creator<arm_cpu_device>;
-const device_type ARM_BE = device_creator<arm_be_cpu_device>;
+DEFINE_DEVICE_TYPE(ARM, arm_cpu_device, "arm_le", "ARM (little)")
+DEFINE_DEVICE_TYPE(ARM_BE, arm_be_cpu_device, "arm_be", "ARM (big)")
arm_cpu_device::arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : cpu_device(mconfig, ARM, "ARM", tag, owner, clock, "arm", __FILE__)
- , m_program_config("program", ENDIANNESS_LITTLE, 32, 26, 0)
- , m_endian(ENDIANNESS_LITTLE)
- , m_copro_type(ARM_COPRO_TYPE_UNKNOWN_CP15)
+ : arm_cpu_device(mconfig, ARM, tag, owner, clock, ENDIANNESS_LITTLE)
{
- memset(m_sArmRegister, 0x00, sizeof(m_sArmRegister));
}
-arm_cpu_device::arm_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, endianness_t endianness)
- : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
+arm_cpu_device::arm_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness)
+ : cpu_device(mconfig, type, tag, owner, clock)
, m_program_config("program", endianness, 32, 26, 0)
, m_endian(endianness)
- , m_copro_type(ARM_COPRO_TYPE_UNKNOWN_CP15)
+ , m_copro_type(copro_type::UNKNOWN_CP15)
{
- memset(m_sArmRegister, 0x00, sizeof(m_sArmRegister));
+ std::fill(std::begin(m_sArmRegister), std::end(m_sArmRegister), 0);
}
arm_be_cpu_device::arm_be_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : arm_cpu_device(mconfig, ARM_BE, "ARM (big endian)", tag, owner, clock, "arm_be", __FILE__, ENDIANNESS_BIG)
+ : arm_cpu_device(mconfig, ARM_BE, tag, owner, clock, ENDIANNESS_BIG)
{
}
@@ -420,7 +416,7 @@ void arm_cpu_device::execute_run()
}
else if ((insn & 0x0f000000u) == 0x0e000000u) /* Coprocessor */
{
- if (m_copro_type == ARM_COPRO_TYPE_VL86C020)
+ if (m_copro_type == copro_type::VL86C020)
HandleCoProVL86C020(insn);
else
HandleCoPro(insn);
@@ -679,7 +675,7 @@ void arm_cpu_device::HandleMemSingle( uint32_t insn )
In other cases, 4 is subracted from R15 here to account for pipelining.
*/
- if (m_copro_type == ARM_COPRO_TYPE_VL86C020 || (cpu_read32(rnv)&3)==0)
+ if (m_copro_type == copro_type::VL86C020 || (cpu_read32(rnv)&3)==0)
R15 -= 4;
m_icount -= S_CYCLE + N_CYCLE;