* signed extended in multiple ifields
@ 2000-12-04 12:52 Johan Rydberg
0 siblings, 0 replies; only message in thread
From: Johan Rydberg @ 2000-12-04 12:52 UTC (permalink / raw)
To: cgen
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-04 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-04 12:52 signed extended in multiple ifields Johan Rydberg
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).