This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
signed extended in multiple ifields
- To: cgen at sources dot redhat dot com
- Subject: signed extended in multiple ifields
- From: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Date: Mon, 04 Dec 2000 21:53:39 +0100
- Organization: Net Insight AB
Hi!
I have a multi-ifield with the following encoding and decoding
sequences:
..
(insert (sequence ()
(set (ifield f-i16-2) (and (srl (ifield f-i16nc)
(const 11)) (const #x1f)))
(set (ifield f-i16-1) (and (ifield f-i16nc) (const
#x7ff)))
))
(extract (sequence ()
(set (ifield f-i16nc) (or (sll (ifield f-i16-2)
(const 11))
(ifield f-i16-1)))
))
..
I would like to sight extend the field after I have extracted it (when
disassembling
or simulating). I wonder if I should do this in the extract () sequence
or when using
the field in an insn? I don't get it to work as it should. Am I
missing something
or am I doing the whole thing wrong (as usual) ?
--
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00
$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
THEN EXCUSE/OBJECT=ME