From: "Aurélien Buhrig" <aurelien.buhrig@tiempo-ic.com>
To: <cgen@sourceware.org>
Subject: sid, base_insn vs entire_insn and ambiguity
Date: Wed, 25 Jun 2008 07:36:00 -0000 [thread overview]
Message-ID: <000d01c8d521$6f2fa690$4d8ef3b0$@buhrig@tiempo-ic.com> (raw)
Hello,
I try to port sid simulator for a new 16bit target. This processor have
multiple word insn. (1 or 2 if there is an immediate value). So insn can
take 16 or 32 bits.
So I have the same problem that the one reported here :
http://sourceware.org/ml/cgen/2006-q3/msg00030.html
Since I do not want to do some ugly code which examines the base_insn bits
in order to decide how to position entire_insn, and since it seems there is
no new way to have the insn length before decoding the instruction, I tried
the second solution that consists in setting the base-insn-bitsize to 32.
I have now 2 problems :
- The disassembly is not correct anymore.
- I have an unresolved ambiguity error.
ERROR: Unable to resolve ambiguity (maybe need some ifield-assertion specs?)
So I tried derived operand with ifield-assertion, the I cannot fix the
ambiguity problem.
Here is the description of the faulty insn:
(define-derived-operand
(name unop-pi-pc-imm52)
(comment "")
(attrs)
(mode UHI)
(args (uimm52) (reg))
(syntax "$uimm52")
(base-ifield f-1opopc)
(encoding (+ UNAD_PI REG_PC uimm52 ) )
(ifield-assertion (eq f-reg 7))
(getter (nop))
(setter (nop)))
(define-derived-operand
(name unop-pi-gr)
(comment "")
(attrs)
(mode UHI)
(args (reg))
(syntax "$(reg)+")
(base-ifield f-1opopc)
(encoding (+ UNAD_PI reg ) )
(ifield-assertion (not (eq f-reg 7)))
(getter (nop))
(setter (nop)))
(define-anyof-operand
(name unop-pi)
(comment "PI addressing modes")
(mode UHI)
(base-ifield f-1opopc)
(choices unop-pi-pc-imm52 unop-pi-gr))
(dni
moveps ; name
(.str mnemonic " (rn)+") ; comment
() ; attrs
("move.$len $sr,($reg)+") ;
syntax
;+ (+ len SEL_1OP ONEOP_MTSR UNAD_PI reg) ; format
(+ len SEL_1OP ONEOP_MTSR unop-pi) ; format
(nop)
())
How can I do ?
Thanks,
Aurelien
next reply other threads:[~2008-06-23 11:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 7:36 Aurélien Buhrig [this message]
[not found] ` <486114F4.1040309@redhat.com>
2008-06-26 9:26 ` Aurélien Buhrig
2008-06-26 15:00 ` Aurélien Buhrig
2008-06-26 16:15 ` Aurélien Buhrig
2008-06-27 8:33 ` Dave Brolley
2008-06-27 16:02 ` Aurélien Buhrig
2008-06-30 8:16 ` Dave Brolley
2008-06-30 13:56 ` Aurélien Buhrig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000d01c8d521$6f2fa690$4d8ef3b0$@buhrig@tiempo-ic.com' \
--to=aurelien.buhrig@tiempo-ic.com \
--cc=cgen@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).