Main Page   Compound List   File List   Compound Members   File Members  

instr.h

Go to the documentation of this file.
00001 /*
00002  Copyright (c) 1992-1993 The Regents of the University of California.
00003  All rights reserved.  See copyright.h for copyright notice and limitation 
00004  of liability and disclaimer of warranty provisions.
00005  */
00006 
00007 #include "copyright.h"
00008 
00009 /* Instruction formats */
00010 
00011 #define rd(i)           (((i) >> 11) & 0x1f)
00012 #define rt(i)           (((i) >> 16) & 0x1f)
00013 #define rs(i)           (((i) >> 21) & 0x1f)
00014 #define shamt(i)        (((i) >> 6) & 0x1f)
00015 #define immed(i)        (((i) & 0x8000) ? (i)|(-0x8000) : (i)&0x7fff)
00016 
00017 #define off26(i)        (((i)&((1<<26)-1))<<2)
00018 #define top4(i)         (((i)&(~((1<<28)-1))))
00019 #define off16(i)        (immed(i)<<2)
00020 
00021 #define extend(i, hibitmask)    (((i)&(hibitmask)) ? ((i)|(-(hibitmask))) : (i))

Generated on Mon Feb 10 09:54:45 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