Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

/users/u3/mtikir/PMaCInstrumentor_v1601/include/PowerPCInstruct.h

Go to the documentation of this file.
00001 #ifndef _PowerPCInstruct_h_
00002 #define _PowerPCInstruct_h_
00003 
00004 #include <Base.h>
00005 #include <defines/PowerPCInstruct.d>
00006 
00007 typedef struct {
00008     uint32_t opc    : 6;
00009     uint32_t frt    : 5;
00010     uint32_t fra    : 5;
00011     uint32_t frb    : 5;
00012     uint32_t frc    : 5;
00013     uint32_t xo     : 5;
00014     uint32_t rc     : 1;
00015 } AForm;
00016 
00017 typedef struct {
00018     uint32_t opc    : 6;
00019     uint32_t bo     : 5;
00020     uint32_t bi     : 5;
00021     int32_t  bd     :14;
00022     uint32_t aa     : 1;
00023     uint32_t lk     : 1;
00024 } BForm;
00025 
00026 typedef struct {
00027     uint32_t opc    : 6;
00028     uint32_t rt_s_bf: 5;
00029     uint32_t ra     : 5;
00030     int32_t  d_ui_si:16;
00031 } DForm;
00032 
00033 typedef struct {
00034     uint32_t opc    : 6;
00035     uint32_t rt_s   : 5;
00036     uint32_t ra     : 5;
00037     int32_t  ds     :14;
00038     uint32_t xo     : 2;
00039 } DsForm;
00040 
00041 typedef struct {
00042     uint32_t opc    : 6;
00043     int32_t  li     :24;
00044     uint32_t aa     : 1;
00045     uint32_t lk     : 1;
00046 } IForm;
00047 
00048 typedef struct {
00049     uint32_t opc    : 6;
00050     uint32_t rs     : 5;
00051     uint32_t ra     : 5;
00052     uint32_t rb_sh  : 5;
00053     uint32_t mb     : 5;
00054     uint32_t me     : 5;
00055     uint32_t rc     : 1;
00056 } MForm;
00057 
00058 typedef struct {
00059     uint32_t opc    : 6;
00060     uint32_t rs     : 5;
00061     uint32_t ra     : 5;
00062     uint32_t sh     : 5;
00063     uint32_t mb_me  : 6;
00064     uint32_t xo     : 3;
00065     uint32_t sh2    : 1;
00066     uint32_t rc     : 1;
00067 } MdForm;
00068 
00069 typedef struct {
00070     uint32_t opc    : 6;
00071     uint32_t rs     : 5;
00072     uint32_t ra     : 5;
00073     uint32_t rb     : 5;
00074     uint32_t mb_me  : 6;
00075     uint32_t xo     : 4;
00076     uint32_t rc     : 1;
00077 } MdsForm;
00078 
00079 typedef struct {
00080     uint32_t opc    : 6;
00081     uint32_t rt_s_bf: 5;
00082     uint32_t ra_sr  : 5;
00083     uint32_t rb_sh  : 5;
00084     uint32_t xo     :10;
00085     uint32_t rc     : 1;
00086 } XForm;
00087 
00088 typedef struct {
00089     uint32_t opc    : 6;
00090     uint32_t bt_bo  : 5;
00091     uint32_t ba_bi  : 5;
00092     uint32_t bb     : 5;
00093     uint32_t xo     :10;
00094     uint32_t lk     : 1;
00095 } XlForm;
00096 
00097 typedef struct {
00098     uint32_t opc    : 6;
00099     uint32_t res1   : 1;
00100     uint32_t flm    : 8;
00101     uint32_t res2   : 1;
00102     uint32_t frb    : 5;
00103     uint32_t xo     :10;
00104     uint32_t rc     : 1;
00105 } XflForm;
00106 
00107 typedef struct {
00108     uint32_t opc     : 6;
00109     uint32_t rt_rs   : 5;
00110     uint32_t spr_tbr :10;
00111     uint32_t xo      :10;
00112     uint32_t rc      : 1;
00113 } XfxForm;
00114 
00115 typedef struct {
00116     uint32_t opc  : 6;
00117     uint32_t rt   : 5;
00118     uint32_t ra   : 5;
00119     uint32_t rb   : 5;
00120     uint32_t oe   : 1;
00121     uint32_t xo   : 9;
00122     uint32_t rc   : 1;
00123 } XoForm;
00124 
00125 typedef struct {
00126     uint32_t opc  : 6;
00127     uint32_t rs   : 5;
00128     uint32_t ra   : 5;
00129     uint32_t sh1  : 5;
00130     uint32_t xo   : 9;
00131     uint32_t sh2  : 1;
00132     uint32_t rc   : 1;
00133 } XsForm;
00134 
00135 typedef struct {
00136     uint32_t opc  : 6;
00137     uint32_t rest :26;
00138 } OcForm;
00139 
00140 typedef struct {
00141     uint32_t opc  : 6; 
00142     uint32_t rest : 24; 
00143     uint32_t aa   : 1;
00144     uint32_t lk   : 1;
00145 } LkForm;
00146 
00147 typedef union {
00148     AForm        a;
00149     BForm        b;
00150     DForm        d;
00151     DsForm       ds;
00152     IForm        i;
00153     MForm        m;
00154     MdForm       md;
00155     MdsForm      mds;
00156     XForm        x;
00157     XflForm      xfl;
00158     XfxForm      xfx;
00159     XlForm       xl;
00160     XoForm       xo;
00161     XsForm       xs;
00162 
00163     OcForm       opc;
00164     LkForm       lk;
00165     uint32_t     bits;
00166 
00167 } PowerPCInstruction;
00168 
00169 #endif
00170 

Generated on Mon Jan 28 11:08:31 2008 for PMaCInstrumentor by doxygen 1.3.5