This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: Problem in decoding instructions in simulator
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: Shrirang Khishti <shrirangk at KPITCummins dot com>
- Cc: cgen at sources dot redhat dot com
- Date: Tue, 25 Oct 2005 21:17:41 -0400
- Subject: Re: Problem in decoding instructions in simulator
- References: <4A1BE23A7B777442B60F4B4916AE0F130830D0F1@sohm.kpit.com>
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