cpu_control.h File Reference


Detailed Description

Contains code macros for the processor control instructions.

Based on ARM chapter 4.3

Id
cpu_control.h,v 1.7 2008/03/14 15:30:52 iamcamiel Exp

X-1.6 Camiel Vanderhoeven 14-MAR-2008 1. More meaningful exceptions replace throwing (int) 1. 2. U64 macro replaces X64 macro.

X-1.5 Camiel Vanderhoeven 30-JAN-2008 Always use set_pc or add_pc to change the program counter.

X-1.4 Camiel Vanderhoeven 30-JAN-2008 Remember number of instructions left in current memory page, so that the translation-buffer doens't need to be consulted on every instruction fetch when the Icache is disabled.

X-1.3 Camiel Vanderhoeven 11-APR-2007 Moved all data that should be saved to a state file to a structure "state".

X-1.2 Camiel Vanderhoeven 30-MAR-2007 Added old changelog comments.

X-1.1 Camiel Vanderhoeven 18-FEB-2007 File created. Contains code previously found in AlphaCPU.h

Definition in file cpu_control.h.

Go to the source code of this file.

Defines

#define DO_BEQ
#define DO_BGE
#define DO_BGT
#define DO_BLBC
#define DO_BLBS
#define DO_BLE
#define DO_BLT
#define DO_BNE
#define DO_BR
#define DO_BSR   DO_BR
#define DO_JMP


Define Documentation

#define DO_BEQ

Value:

if(!state.r[REG_1]) \
    add_pc(DISP_21 * 4);

Definition at line 55 of file cpu_control.h.

#define DO_BGE

Value:

if((s64) state.r[REG_1] >= 0) \
    add_pc(DISP_21 * 4);

Definition at line 58 of file cpu_control.h.

#define DO_BGT

Value:

if((s64) state.r[REG_1] > 0) \
    add_pc(DISP_21 * 4);

Definition at line 61 of file cpu_control.h.

#define DO_BLBC

Value:

if(!(state.r[REG_1] & 1)) \
    add_pc(DISP_21 * 4);

Definition at line 64 of file cpu_control.h.

#define DO_BLBS

Value:

if(state.r[REG_1] & 1) \
    add_pc(DISP_21 * 4);

Definition at line 67 of file cpu_control.h.

#define DO_BLE

Value:

if((s64) state.r[REG_1] <= 0) \
    add_pc(DISP_21 * 4);

Definition at line 70 of file cpu_control.h.

#define DO_BLT

Value:

if((s64) state.r[REG_1] < 0) \
    add_pc(DISP_21 * 4);

Definition at line 73 of file cpu_control.h.

#define DO_BNE

Value:

if(state.r[REG_1]) \
    add_pc(DISP_21 * 4);

Definition at line 76 of file cpu_control.h.

#define DO_BR

Value:

{                                       \
    state.r[REG_1] = state.pc &~U64(0x3); \
    add_pc(DISP_21 * 4);                  \
  }

Definition at line 79 of file cpu_control.h.

#define DO_BSR   DO_BR

Definition at line 85 of file cpu_control.h.

#define DO_JMP

Value:

{                                       \
    temp_64 = state.r[REG_2] &~U64(0x3);  \
    state.r[REG_1] = state.pc &~U64(0x3); \
    set_pc(temp_64 | (state.pc & 3));     \
  }

Definition at line 87 of file cpu_control.h.


SourceForge.net Logo
Project space on SourceForge.net