This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc simulator instruction question


Joel Sherrill <joel.sherrill@oarcorp.com> writes:

> >> Is the stfiwx not implemented in the simulator? Not valid?
> > Looks unimplemented.  GCC didn't generate it until 2005.
> I have no idea how to read, modify, or use ppc-instructions
> to add it.  How can I find the instruction in there?

The individual instruction patterns are the lines looking like "0.31,....".
The parts before the colons describe the instruction encoding, breaking
down the bits into operand fields and opcode numbers.  For example:

0.31,6.RT,11./,16./,21.83,31./:X:::Move From Machine State Register

means: bits 0..5  contain the value 31
            6..10 contain the field "RT" (use the expression *rT in the body)
            11..15 contain a don't care field
            16..20 likewise
            21..30 contains the value 83
            31     contains a don't care field

*601: PPC_UNIT_IU,    PPC_UNIT_IU,    1,  1,  0
*603: PPC_UNIT_SRU,   PPC_UNIT_SRU,   1,  1,  0
*603e:PPC_UNIT_SRU,   PPC_UNIT_SRU,   1,  1,  0
*604: PPC_UNIT_MCIU,  PPC_UNIT_MCIU,  3,  3,  0

These are functional unit utilization/performance numbers.
 
        if (IS_PROBLEM_STATE(processor))
          program_interrupt(processor, cia,
                            privileged_instruction_program_interrupt);
        else {
          *rT = MSR;
          check_masked_interrupts(processor);
        }

This code actually implements the instruction.


- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]