This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

signed extended in multiple ifields



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]