Previous | 199869 Revisions | Next |
r21912 Sunday 17th March, 2013 at 17:10:46 UTC by R. Belmont |
---|
Fix compile problems on some OS X versions (nw) |
[src/emu/cpu/m6809] | konami.c konami.h konami.ops |
r21911 | r21912 | |
---|---|---|
517 | 517 | else |
518 | 518 | m_cc &= ~CC_C; |
519 | 519 | |
520 | m_d.w = set_flags<UINT16>(CC_NZ, safe_shift_right<UINT16>(m_d.w, m_temp.b.l)); | |
520 | m_d.w = set_flags<UINT16>(CC_NZ, safe_shift_right_unsigned<UINT16>(m_d.w, m_temp.b.l)); | |
521 | 521 | } |
522 | 522 | eat(1); |
523 | 523 | return; |
r21911 | r21912 | |
---|---|---|
249 | 249 | |
250 | 250 | |
251 | 251 | //------------------------------------------------- |
252 | // safe_shift_right_unsigned | |
253 | //------------------------------------------------- | |
254 | ||
255 | template<class T> T konami_cpu_device::safe_shift_right_unsigned(T value, UINT32 shift) | |
256 | { | |
257 | T result; | |
258 | ||
259 | if (shift < (sizeof(T) * 8)) | |
260 | result = value >> shift; | |
261 | else | |
262 | result = 0; | |
263 | ||
264 | return result; | |
265 | } | |
266 | ||
267 | //------------------------------------------------- | |
252 | 268 | // safe_shift_left |
253 | 269 | //------------------------------------------------- |
254 | 270 |
r21911 | r21912 | |
---|---|---|
67 | 67 | |
68 | 68 | // miscellaneous |
69 | 69 | template<class T> T safe_shift_right(T value, UINT32 shift); |
70 | template<class T> T safe_shift_right_unsigned(T value, UINT32 shift); | |
70 | 71 | template<class T> T safe_shift_left(T value, UINT32 shift); |
71 | 72 | void set_lines(UINT8 data); |
72 | 73 | void execute_one(); |
Previous | 199869 Revisions | Next |