diff options
author | 2015-05-31 13:20:42 +0200 | |
---|---|---|
committer | 2015-05-31 13:25:17 +0200 | |
commit | 511762fa2d25965d05fc277efd29fb4a50d95420 (patch) | |
tree | 09211cade5deaa068d2e2603ba93c4ca4d8b6951 /src/emu/cpu | |
parent | 3a9d6f4b4be4bed19720eea2cffab021139bd241 (diff) |
Allow compiling with shared libraries [O. Galibert]
Put SHLIB=1 in the main makefile, or on the command line.
The idea is to get a *way* faster link with symbols. It works at
least on linux, with one annoying caveat: you have to be in the
build/projects/sdl/mame/gmake-linux directory to start mame
afterwards. We're going to move some things around to be able to use
LD_LIBRARY_PATH or have it start as-is from the root.
Diffstat (limited to 'src/emu/cpu')
-rw-r--r-- | src/emu/cpu/m6809/hd6309.c | 26 | ||||
-rw-r--r-- | src/emu/cpu/m6809/konami.c | 20 | ||||
-rw-r--r-- | src/emu/cpu/m6809/m6809.c | 6 | ||||
-rw-r--r-- | src/emu/cpu/m6809/m6809.h | 38 | ||||
-rw-r--r-- | src/emu/cpu/mcs96/i8xc196.c | 4 | ||||
-rw-r--r-- | src/emu/cpu/mcs96/i8xc196.h | 1 | ||||
-rw-r--r-- | src/emu/cpu/pic16c62x/pic16c62x.c | 9 |
7 files changed, 58 insertions, 46 deletions
diff --git a/src/emu/cpu/m6809/hd6309.c b/src/emu/cpu/m6809/hd6309.c index 027c9b7511b..5b270d26c90 100644 --- a/src/emu/cpu/m6809/hd6309.c +++ b/src/emu/cpu/m6809/hd6309.c @@ -313,7 +313,7 @@ offs_t hd6309_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *o // read_operand //------------------------------------------------- -ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand() +inline UINT8 hd6309_device::read_operand() { switch(m_addressing_mode) { @@ -332,7 +332,7 @@ ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand() // read_operand //------------------------------------------------- -ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand(int ordinal) +inline UINT8 hd6309_device::read_operand(int ordinal) { switch(m_addressing_mode) { @@ -356,7 +356,7 @@ ATTR_FORCE_INLINE UINT8 hd6309_device::read_operand(int ordinal) // write_operand //------------------------------------------------- -ATTR_FORCE_INLINE void hd6309_device::write_operand(UINT8 data) +inline void hd6309_device::write_operand(UINT8 data) { switch(m_addressing_mode) { @@ -375,7 +375,7 @@ ATTR_FORCE_INLINE void hd6309_device::write_operand(UINT8 data) // write_operand //------------------------------------------------- -ATTR_FORCE_INLINE void hd6309_device::write_operand(int ordinal, UINT8 data) +inline void hd6309_device::write_operand(int ordinal, UINT8 data) { switch(m_addressing_mode) { @@ -398,7 +398,7 @@ ATTR_FORCE_INLINE void hd6309_device::write_operand(int ordinal, UINT8 data) // bittest_register //------------------------------------------------- -ATTR_FORCE_INLINE UINT8 &hd6309_device::bittest_register() +inline UINT8 &hd6309_device::bittest_register() { switch(m_temp_im & 0xC0) { @@ -414,7 +414,7 @@ ATTR_FORCE_INLINE UINT8 &hd6309_device::bittest_register() // bittest_source //------------------------------------------------- -ATTR_FORCE_INLINE bool hd6309_device::bittest_source() +inline bool hd6309_device::bittest_source() { return (m_temp.b.l & (1 << ((m_temp_im >> 3) & 0x07))) ? true : false; } @@ -424,7 +424,7 @@ ATTR_FORCE_INLINE bool hd6309_device::bittest_source() // bittest_dest //------------------------------------------------- -ATTR_FORCE_INLINE bool hd6309_device::bittest_dest() +inline bool hd6309_device::bittest_dest() { return (bittest_register() & (1 << ((m_temp_im >> 0) & 0x07))) ? true : false; } @@ -434,7 +434,7 @@ ATTR_FORCE_INLINE bool hd6309_device::bittest_dest() // bittest_set //------------------------------------------------- -ATTR_FORCE_INLINE void hd6309_device::bittest_set(bool result) +inline void hd6309_device::bittest_set(bool result) { if (result) bittest_register() |= (1 << ((m_temp_im >> 0) & 0x07)); @@ -448,7 +448,7 @@ ATTR_FORCE_INLINE void hd6309_device::bittest_set(bool result) // read_exgtfr_register //------------------------------------------------- -ATTR_FORCE_INLINE m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg) +inline m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_register(UINT8 reg) { UINT16 value = 0; @@ -486,7 +486,7 @@ ATTR_FORCE_INLINE m6809_base_device::exgtfr_register hd6309_device::read_exgtfr_ // write_exgtfr_register //------------------------------------------------- -ATTR_FORCE_INLINE void hd6309_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value) +inline void hd6309_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value) { switch(reg & 0x0F) { @@ -517,7 +517,7 @@ ATTR_FORCE_INLINE void hd6309_device::write_exgtfr_register(UINT8 reg, m6809_bas // tfr_read //------------------------------------------------- -ATTR_FORCE_INLINE bool hd6309_device::tfr_read(UINT8 opcode, UINT8 arg, UINT8 &data) +inline bool hd6309_device::tfr_read(UINT8 opcode, UINT8 arg, UINT8 &data) { PAIR16 *reg; @@ -550,7 +550,7 @@ ATTR_FORCE_INLINE bool hd6309_device::tfr_read(UINT8 opcode, UINT8 arg, UINT8 &d // tfr_write //------------------------------------------------- -ATTR_FORCE_INLINE bool hd6309_device::tfr_write(UINT8 opcode, UINT8 arg, UINT8 data) +inline bool hd6309_device::tfr_write(UINT8 opcode, UINT8 arg, UINT8 data) { PAIR16 *reg; @@ -789,7 +789,7 @@ bool hd6309_device::divd() // execute_one - try to execute a single instruction //------------------------------------------------- -ATTR_FORCE_INLINE void hd6309_device::execute_one() +inline void hd6309_device::execute_one() { switch(pop_state()) { diff --git a/src/emu/cpu/m6809/konami.c b/src/emu/cpu/m6809/konami.c index d86f44651d2..8dc2bf3ab78 100644 --- a/src/emu/cpu/m6809/konami.c +++ b/src/emu/cpu/m6809/konami.c @@ -120,7 +120,7 @@ offs_t konami_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT // read_operand //------------------------------------------------- -inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand() +inline UINT8 konami_cpu_device::read_operand() { return super::read_operand(); } @@ -130,7 +130,7 @@ inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand() // read_operand //------------------------------------------------- -inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand(int ordinal) +inline UINT8 konami_cpu_device::read_operand(int ordinal) { switch(m_addressing_mode) { @@ -146,7 +146,7 @@ inline ATTR_FORCE_INLINE UINT8 konami_cpu_device::read_operand(int ordinal) // write_operand //------------------------------------------------- -ATTR_FORCE_INLINE void konami_cpu_device::write_operand(UINT8 data) +inline void konami_cpu_device::write_operand(UINT8 data) { super::write_operand(data); } @@ -157,7 +157,7 @@ ATTR_FORCE_INLINE void konami_cpu_device::write_operand(UINT8 data) // write_operand //------------------------------------------------- -ATTR_FORCE_INLINE void konami_cpu_device::write_operand(int ordinal, UINT8 data) +inline void konami_cpu_device::write_operand(int ordinal, UINT8 data) { switch(m_addressing_mode) { @@ -173,7 +173,7 @@ ATTR_FORCE_INLINE void konami_cpu_device::write_operand(int ordinal, UINT8 data) // ireg //------------------------------------------------- -ATTR_FORCE_INLINE UINT16 &konami_cpu_device::ireg() +inline UINT16 &konami_cpu_device::ireg() { switch(m_opcode & 0x70) { @@ -194,7 +194,7 @@ ATTR_FORCE_INLINE UINT16 &konami_cpu_device::ireg() // read_exgtfr_register //------------------------------------------------- -ATTR_FORCE_INLINE m6809_base_device::exgtfr_register konami_cpu_device::read_exgtfr_register(UINT8 reg) +inline m6809_base_device::exgtfr_register konami_cpu_device::read_exgtfr_register(UINT8 reg) { exgtfr_register result; result.word_value = 0x00FF; @@ -217,7 +217,7 @@ ATTR_FORCE_INLINE m6809_base_device::exgtfr_register konami_cpu_device::read_exg // write_exgtfr_register //------------------------------------------------- -ATTR_FORCE_INLINE void konami_cpu_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value) +inline void konami_cpu_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value) { switch(reg & 0x07) { @@ -287,7 +287,7 @@ template<class T> T konami_cpu_device::safe_shift_left(T value, UINT32 shift) // lmul //------------------------------------------------- -ATTR_FORCE_INLINE void konami_cpu_device::lmul() +inline void konami_cpu_device::lmul() { PAIR result; @@ -313,7 +313,7 @@ ATTR_FORCE_INLINE void konami_cpu_device::lmul() // divx //------------------------------------------------- -ATTR_FORCE_INLINE void konami_cpu_device::divx() +inline void konami_cpu_device::divx() { UINT16 result; UINT8 remainder; @@ -357,7 +357,7 @@ void konami_cpu_device::set_lines(UINT8 data) // execute_one - try to execute a single instruction //------------------------------------------------- -ATTR_FORCE_INLINE void konami_cpu_device::execute_one() +inline void konami_cpu_device::execute_one() { switch(pop_state()) { diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c index 3b7fc33d94f..1b7b0e1e777 100644 --- a/src/emu/cpu/m6809/m6809.c +++ b/src/emu/cpu/m6809/m6809.c @@ -456,7 +456,7 @@ const char *m6809_base_device::inputnum_string(int inputnum) // read_exgtfr_register //------------------------------------------------- -ATTR_FORCE_INLINE m6809_base_device::exgtfr_register m6809_base_device::read_exgtfr_register(UINT8 reg) +m6809_base_device::exgtfr_register m6809_base_device::read_exgtfr_register(UINT8 reg) { exgtfr_register result; result.byte_value = 0xFF; @@ -483,7 +483,7 @@ ATTR_FORCE_INLINE m6809_base_device::exgtfr_register m6809_base_device::read_exg // write_exgtfr_register //------------------------------------------------- -ATTR_FORCE_INLINE void m6809_base_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value) +void m6809_base_device::write_exgtfr_register(UINT8 reg, m6809_base_device::exgtfr_register value) { switch(reg & 0x0F) { @@ -516,7 +516,7 @@ void m6809_base_device::log_illegal() // execute_one - try to execute a single instruction //------------------------------------------------- -ATTR_FORCE_INLINE void m6809_base_device::execute_one() +void m6809_base_device::execute_one() { switch(pop_state()) { diff --git a/src/emu/cpu/m6809/m6809.h b/src/emu/cpu/m6809/m6809.h index eb0633af44c..7b14a6882e5 100644 --- a/src/emu/cpu/m6809/m6809.h +++ b/src/emu/cpu/m6809/m6809.h @@ -147,27 +147,27 @@ protected: devcb_write_line m_lic_func; // LIC pin on the 6809E // eat cycles - ATTR_FORCE_INLINE void eat(int cycles) { m_icount -= cycles; } + inline void eat(int cycles) { m_icount -= cycles; } void eat_remaining(); // read a byte from given memory location - ATTR_FORCE_INLINE UINT8 read_memory(UINT16 address) { eat(1); return m_addrspace[AS_PROGRAM]->read_byte(address); } + inline UINT8 read_memory(UINT16 address) { eat(1); return m_addrspace[AS_PROGRAM]->read_byte(address); } // write a byte to given memory location - ATTR_FORCE_INLINE void write_memory(UINT16 address, UINT8 data) { eat(1); m_addrspace[AS_PROGRAM]->write_byte(address, data); } + inline void write_memory(UINT16 address, UINT8 data) { eat(1); m_addrspace[AS_PROGRAM]->write_byte(address, data); } // read_opcode() is like read_memory() except it is used for reading opcodes. In the case of a system // with memory mapped I/O, this function can be used to greatly speed up emulation. - ATTR_FORCE_INLINE UINT8 read_opcode(UINT16 address) { eat(1); return m_direct->read_decrypted_byte(address); } + inline UINT8 read_opcode(UINT16 address) { eat(1); return m_direct->read_decrypted_byte(address); } // read_opcode_arg() is identical to read_opcode() except it is used for reading opcode arguments. This // difference can be used to support systems that use different encoding mechanisms for opcodes // and opcode arguments. - ATTR_FORCE_INLINE UINT8 read_opcode_arg(UINT16 address) { eat(1); return m_direct->read_raw_byte(address); } + inline UINT8 read_opcode_arg(UINT16 address) { eat(1); return m_direct->read_raw_byte(address); } // read_opcode() and bump the program counter - ATTR_FORCE_INLINE UINT8 read_opcode() { return read_opcode(m_pc.w++); } - ATTR_FORCE_INLINE UINT8 read_opcode_arg() { return read_opcode_arg(m_pc.w++); } + inline UINT8 read_opcode() { return read_opcode(m_pc.w++); } + inline UINT8 read_opcode_arg() { return read_opcode_arg(m_pc.w++); } // state stack - implemented as a UINT32 void push_state(UINT8 state) { m_state = (m_state << 8) | state; } @@ -219,15 +219,15 @@ protected: template<class T> T set_flags(UINT8 mask, T r); // branch conditions - ATTR_FORCE_INLINE bool cond_hi() { return !(m_cc & CC_ZC); } // BHI/BLS - ATTR_FORCE_INLINE bool cond_cc() { return !(m_cc & CC_C); } // BCC/BCS - ATTR_FORCE_INLINE bool cond_ne() { return !(m_cc & CC_Z); } // BNE/BEQ - ATTR_FORCE_INLINE bool cond_vc() { return !(m_cc & CC_V); } // BVC/BVS - ATTR_FORCE_INLINE bool cond_pl() { return !(m_cc & CC_N); } // BPL/BMI - ATTR_FORCE_INLINE bool cond_ge() { return (m_cc & CC_N ? true : false) == (m_cc & CC_V ? true : false); } // BGE/BLT - ATTR_FORCE_INLINE bool cond_gt() { return cond_ge() && !(m_cc & CC_Z); } // BGT/BLE - ATTR_FORCE_INLINE void set_cond(bool cond) { m_cond = cond; } - ATTR_FORCE_INLINE bool branch_taken() { return m_cond; } + inline bool cond_hi() { return !(m_cc & CC_ZC); } // BHI/BLS + inline bool cond_cc() { return !(m_cc & CC_C); } // BCC/BCS + inline bool cond_ne() { return !(m_cc & CC_Z); } // BNE/BEQ + inline bool cond_vc() { return !(m_cc & CC_V); } // BVC/BVS + inline bool cond_pl() { return !(m_cc & CC_N); } // BPL/BMI + inline bool cond_ge() { return (m_cc & CC_N ? true : false) == (m_cc & CC_V ? true : false); } // BGE/BLT + inline bool cond_gt() { return cond_ge() && !(m_cc & CC_Z); } // BGT/BLE + inline void set_cond(bool cond) { m_cond = cond; } + inline bool branch_taken() { return m_cond; } // interrupt registers bool firq_saves_entire_state() { return false; } @@ -235,8 +235,8 @@ protected: UINT16 entire_state_registers() { return 0xFF; } // miscellaneous - exgtfr_register read_exgtfr_register(UINT8 reg); - void write_exgtfr_register(UINT8 reg, exgtfr_register value); + inline exgtfr_register read_exgtfr_register(UINT8 reg); + inline void write_exgtfr_register(UINT8 reg, exgtfr_register value); bool is_register_addressing_mode(); bool is_ea_addressing_mode() { return m_addressing_mode == ADDRESSING_MODE_EA; } UINT16 get_pending_interrupt(); @@ -255,7 +255,7 @@ private: int m_clock_divider; // functions - void execute_one(); + inline void execute_one(); const char *inputnum_string(int inputnum); }; diff --git a/src/emu/cpu/mcs96/i8xc196.c b/src/emu/cpu/mcs96/i8xc196.c index 8e80da19cdb..19553280de2 100644 --- a/src/emu/cpu/mcs96/i8xc196.c +++ b/src/emu/cpu/mcs96/i8xc196.c @@ -69,4 +69,8 @@ UINT16 i8xc196_device::io_r16(UINT8 adr) return data; } +void i8xc196_device::do_exec_partial() +{ +} + #include "cpu/mcs96/i8xc196.inc" diff --git a/src/emu/cpu/mcs96/i8xc196.h b/src/emu/cpu/mcs96/i8xc196.h index cb41e693fe8..299f6c9128d 100644 --- a/src/emu/cpu/mcs96/i8xc196.h +++ b/src/emu/cpu/mcs96/i8xc196.h @@ -23,7 +23,6 @@ public: virtual void do_exec_full(); virtual void do_exec_partial(); - virtual void next(int cycles); virtual void io_w8(UINT8 adr, UINT8 data); virtual void io_w16(UINT8 adr, UINT16 data); virtual UINT8 io_r8(UINT8 adr); diff --git a/src/emu/cpu/pic16c62x/pic16c62x.c b/src/emu/cpu/pic16c62x/pic16c62x.c index 42e92b0addf..1d2dae52b95 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.c +++ b/src/emu/cpu/pic16c62x/pic16c62x.c @@ -57,6 +57,15 @@ #include "pic16c62x.h" +const device_type PIC16C620 = &device_creator<pic16c620_device>; +const device_type PIC16C620A = &device_creator<pic16c620a_device>; +const device_type PIC16C621 = &device_creator<pic16c621_device>; +const device_type PIC16C621A = &device_creator<pic16c621a_device>; +const device_type PIC16C622 = &device_creator<pic16c622_device>; +const device_type PIC16C622A = &device_creator<pic16c622a_device>; + + + /**************************************************************************** * Internal Memory Map ****************************************************************************/ |