Subject: [rohc] SigComp - is the bytecode representation unique?

From: Cristian CONSTANTIN <[email-masked]>
Date: Mon, 25 Apr 2005 13:21:08 +0200

hi!

suppose you're using the assembly language for UDVM defined in
draft-ietf-rohc-sigcomp-user-guide-01.txt and write a udvm program;
then you translate it into bytecode. is the result of this translation
unique or are there _several possible_ (correct) representations in bytecode 
for _the same_ assembly program?

if I refer to "Figure 10: Bytecode for a multitype (%) operand" in the
SigComp RFC then, the value %0, for example, can be represented like:

0x00     on one byte, when using the first rule 
0xA000   on two bytes, when using the seventh rule
0x800000 on three bytes, when using the eighth rule 

are all these representations correct? 
thanks in advance for your answer.
bye now!
cristian
-- 
 _          | There are many people who use UNIX or Linux  
(_'_        | who IMHO do not understand UNIX.
  (_'rist   |              --David Korn  
GPG public key at wwwkeys.de.pgp.net
_______________________________________________
Rohc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rohc

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 25 Apr 2005 14:11:57 +0200

On Apr 25 2005, at 13:21 Uhr, Cristian CONSTANTIN wrote:

> _several possible_ (correct) representations in bytecode
> for _the same_ assembly program

Yes.  It is up to the assembler to determine the best variant for 
coding each operand.
Note that there may be interesting dependencies (e.g., a forward 
reference may cause you to generate long code which in turn causes a 
later back reference to require a larger operand than really 
necessary).
For efficiency, you *need* a multipass assembler.

(On a higher level of consideration, the entire assembly language thing 
is informative and not part of the normative standard.
What we standardized was the UDVM semantics and the state management 
around that.
We did an assembly language just to make it simpler to talk about UDVM 
code.)

Gruesse, Carsten