Main Page   Compound List   File List   Compound Members   File Members  

instr.h File Reference

#include "copyright.h"

Go to the source code of this file.

Defines

#define rd(i)   (((i) >> 11) & 0x1f)
#define rt(i)   (((i) >> 16) & 0x1f)
#define rs(i)   (((i) >> 21) & 0x1f)
#define shamt(i)   (((i) >> 6) & 0x1f)
#define immed(i)   (((i) & 0x8000) ? (i)|(-0x8000) : (i)&0x7fff)
#define off26(i)   (((i)&((1<<26)-1))<<2)
#define top4(i)   (((i)&(~((1<<28)-1))))
#define off16(i)   (immed(i)<<2)
#define extend(i, hibitmask)   (((i)&(hibitmask)) ? ((i)|(-(hibitmask))) : (i))


Define Documentation

#define extend i,
hibitmask       (((i)&(hibitmask)) ? ((i)|(-(hibitmask))) : (i))
 

Definition at line 21 of file instr.h.

#define immed      (((i) & 0x8000) ? (i)|(-0x8000) : (i)&0x7fff)
 

Definition at line 15 of file instr.h.

#define off16      (immed(i)<<2)
 

Definition at line 19 of file instr.h.

#define off26      (((i)&((1<<26)-1))<<2)
 

Definition at line 17 of file instr.h.

#define rd      (((i) >> 11) & 0x1f)
 

Definition at line 11 of file instr.h.

#define rs      (((i) >> 21) & 0x1f)
 

Definition at line 13 of file instr.h.

Referenced by Machine::OneInstruction.

#define rt      (((i) >> 16) & 0x1f)
 

Definition at line 12 of file instr.h.

Referenced by Machine::OneInstruction.

#define shamt      (((i) >> 6) & 0x1f)
 

Definition at line 14 of file instr.h.

#define top4      (((i)&(~((1<<28)-1))))
 

Definition at line 18 of file instr.h.


Generated on Mon Feb 10 09:54:49 2003 for nachos by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees