hi, all.

I found there are some switchs like switch cases (C/C++) in the file "decode.cc"

here's the code below:

------------------------------------------------------------------------------------------

StaticInstPtr

ArmISA::Decoder::decodeInst(ArmISA::ExtMachInst machInst)

{

    using namespace ArmISAInst;

  switch (THUMB) {

    

    case 0x0:

      switch (AARCH64) {

        

        case 0x0:

          switch (COND_CODE) {

            

            case 0xf:  

              // 
ArmUnconditional::armUnconditional(([], {}))

              

                  {

...

break;

    default:switch (ENCODING) { 

 case 0x0:

switch (SEVEN_AND_FOUR) {

...

...

...

------------------------------------------------------------------------------------------

I'd like know what's the switch criterion? 

Such as "THUMB" , "AARCH64" , "COND_CODE" , "ENCODING" , "SEVEN_AND_FOUR" ...etc

Are they defined in the file "arch/arm/types.hh" ?

here's the code below:

------------------------------------------------------------------------------------------

    BitUnion64(ExtMachInst)

        // ITSTATE bits

&#160; &#160; &#160; &#160; Bitfield<55, 48> itstate;

&#160; &#160; &#160; &#160; Bitfield<55, 52> itstateCond;

&#160; &#160; &#160; &#160; Bitfield<51, 48> itstateMask;

&#160; &#160; &#160; &#160; // FPSCR fields

&#160; &#160; &#160; &#160; Bitfield<41, 40> fpscrStride;

&#160; &#160; &#160; &#160; Bitfield<39, 37> fpscrLen;

&#160; &#160; &#160; &#160; // Bitfields to select mode.

&#160; &#160; &#160; &#160; Bitfield<36> &#160; &#160; thumb; // here it's what 
I&#160;mentioned&#160;

&#160; &#160; &#160; &#160; Bitfield<35> &#160; &#160; bigThumb; // here it's 
what I&#160;mentioned&#160;

&#160; &#160; &#160; &#160; Bitfield<34> &#160; &#160; aarch64; // here it's 
what I&#160;mentioned&#160;

&#160; &#160; &#160; &#160; // Made up bitfields that make life easier.

&#160; &#160; &#160; &#160; Bitfield<33> &#160; &#160; sevenAndFour; // here 
it's what I&#160;mentioned&#160;

&#160; &#160; &#160; &#160; Bitfield<32> &#160; &#160; isMisc; // here it's 
what I&#160;mentioned&#160;

&#160; &#160; &#160; &#160; uint32_t &#160; &#160; &#160; &#160; instBits;

&#160; &#160; &#160; &#160; // All the different types of opcode fields.

&#160; &#160; &#160; &#160; Bitfield<27, 25> encoding;

...

...

...

------------------------------------------------------------------------------------------

Thanks!

 
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to