Search
lxdream.org :: lxdream/src/aica/armcore.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/armcore.c
changeset 2:42349f6ea216
next5:d85c2e81ce2d
author nkeynes
date Sat Aug 21 06:15:49 2004 +0000 (16 years ago)
permissions -rw-r--r--
last change Commit changes into cvs
file annotate diff log raw
nkeynes@2
     1
nkeynes@2
     2
#include "armcore.h"
nkeynes@2
     3
nkeynes@2
     4
struct arm_registers armr;
nkeynes@2
     5
nkeynes@2
     6
/* NB: The arm (one assumes) has a different memory map, but for the meantime... */
nkeynes@2
     7
nkeynes@2
     8
#define MEM_READ_BYTE( addr ) mem_read_byte(addr)
nkeynes@2
     9
#define MEM_READ_WORD( addr ) mem_read_word(addr)
nkeynes@2
    10
#define MEM_READ_LONG( addr ) mem_read_long(addr)
nkeynes@2
    11
#define MEM_WRITE_BYTE( addr, val ) mem_write_byte(addr, val)
nkeynes@2
    12
#define MEM_WRITE_WORD( addr, val ) mem_write_word(addr, val)
nkeynes@2
    13
#define MEM_WRITE_LONG( addr, val ) mem_write_long(addr, val)
nkeynes@2
    14
nkeynes@2
    15
#define PC armr.r[15];
nkeynes@2
    16
nkeynes@2
    17
void arm_execute_instruction( void ) 
nkeynes@2
    18
{
nkeynes@2
    19
  uint32_t ir = MEM_READ_LONG(PC);
nkeynes@2
    20
nkeynes@2
    21
#define COND(ir) (ir>>28)
nkeynes@2
    22
nkeynes@2
    23
  
nkeynes@2
    24
}
nkeynes@2
    25
nkeynes@2
    26
void arm_execute_thumb_instruction( void )
nkeynes@2
    27
{
nkeynes@2
    28
  
nkeynes@2
    29
nkeynes@2
    30
nkeynes@2
    31
}
.