MAC instructions on H8300S [H8S/2600]

Nick Clifton nickc@redhat.com
Fri Feb 21 11:39:00 GMT 2003


Hi Venky,

> The culprits were MAC-related instructions. being 
> generated by the compiler. The simulator does not 
> recognise these instruction and aborts. I was 
> trying to add the support to the simulator.
> 
> In the file include/opcode/h8300.h, in the 
>  const struct h8_opcode h8_opcodes[] definition:
> 
> The definition for ldmac and stmac should be 
> 
>   NEW_SOP(O(O_LDMAC,SL),1,2,"ldmac"),{{RS32,MD32,E}},{{0x0,0x3,MD32,RS32,E}}
> EOP,
>   NEW_SOP(O(O_STMAC,SL),1,2,"stmac"),{{MS32,RD32,E}},{{0x0,0x2,MS32,RD32,E}}
> EOP,
> 
> where MS32 and MD32 are defined as :
> 
> #define MS32            (SRC|L_32|MACREG)
> #define MD32            (DST|L_32|MACREG)

Thanks very much for explaining and solving this problem.  I have
applied your suggested change.

Cheers
        Nick



More information about the Gdb mailing list