Problem in decoding instructions in simulator
Frank Ch. Eigler
fche@redhat.com
Wed Oct 26 01:17:00 GMT 2005
Hi -
> [...]
> 1. Though I have specified little endian in define-cpu construct in
> my target.cpu file
> [...but...]
> #define TARGET_BIG_ENDIAN 1
> Are there any other factors affecting this macro ?
The "insn-endian" parameter cpu may be relevant.
> 2. My next query is regarding following dump code ..
>
> 400: e0 20 mov r0,#0x2
> 402: e6 f1 7b 00 mov r1,#0x7b
> [...]
> Although PC is at the location 0x400 instruction being decoded is from
> the location 0x402. What might be reason for this ?
Perhaps the define-isa parameters are inconsistent somehow with the
actual encoding.
> [...] According to me this targetbf_decode is called from mloop.c
> file which is generated from mloop.in file . I want to ask whether
> beacuse of this file , it is giving above behavior or is there any
> other affecting factor ?
It is possible, but hard to say without seeing your sources.
> Also is there any documentation about how to write mloop.in file.
Not really. Take an existing one as a model and modify as needed.
- FChE
More information about the Cgen
mailing list