Search
lxdream.org :: lxdream/src/aica/armcore.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/armcore.c
changeset 431:248dd77a9e44
prev86:f151e63f9754
next536:d3a65d75b5ae
author nkeynes
date Tue Oct 09 08:12:29 2007 +0000 (15 years ago)
permissions -rw-r--r--
last change Fix compilation warnings
file annotate diff log raw
1.1 --- a/src/aica/armcore.c Sun Jan 22 22:40:05 2006 +0000
1.2 +++ b/src/aica/armcore.c Tue Oct 09 08:12:29 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: armcore.c,v 1.20 2006-01-22 22:40:05 nkeynes Exp $
1.6 + * $Id: armcore.c,v 1.21 2007-10-09 08:11:51 nkeynes Exp $
1.7 *
1.8 * ARM7TDMI CPU emulation core.
1.9 *
1.10 @@ -18,6 +18,7 @@
1.11
1.12 #define MODULE aica_module
1.13 #include "dream.h"
1.14 +#include "dreamcast.h"
1.15 #include "mem.h"
1.16 #include "aica/armcore.h"
1.17 #include "aica/aica.h"
1.18 @@ -405,7 +406,7 @@
1.19 #define SHIFTIMM(ir) ((ir>>7)&0x1F)
1.20 #define IMMROT(ir) ((ir>>7)&0x1E)
1.21 #define ROTIMM12(ir) ROTATE_RIGHT_LONG(IMM8(ir),IMMROT(ir))
1.22 -#define SIGNEXT24(n) ((n&0x00800000) ? (n|0xFF000000) : (n&0x00FFFFFF))
1.23 +#define SIGNEXT24(n) (((n)&0x00800000) ? ((n)|0xFF000000) : ((n)&0x00FFFFFF))
1.24 #define SHIFT(ir) ((ir>>4)&0x07)
1.25 #define DISP24(ir) ((ir&0x00FFFFFF))
1.26 #define UNDEF(ir) do{ arm_raise_exception( EXC_UNDEFINED ); return TRUE; } while(0)
1.27 @@ -632,7 +633,7 @@
1.28 */
1.29 static uint32_t arm_get_address_operand( uint32_t ir )
1.30 {
1.31 - uint32_t addr;
1.32 + uint32_t addr=0;
1.33
1.34 /* I P U . W */
1.35 switch( (ir>>21)&0x1D ) {
1.36 @@ -759,6 +760,7 @@
1.37 cond = 1;
1.38 break;
1.39 case 15: /* (NV) */
1.40 + default:
1.41 cond = 0;
1.42 UNDEF(ir);
1.43 }
.