Subject: RE: [rohc] Use of the stack

From: "Surtees, Abigail" <[email-masked]>
Date: Wed, 6 Jul 2005 16:19:30 +0100

Hi Pekka, all,

OK.  What do you think of the following text for the implementer's guide?

"3.4  Using the stack

   The instructions PUSH, POP, CALL and RETURN make use of a stack which
   is set up using the well known memory address stack_location to
   define where in memory the stack is located.  Use of the stack is
   defined in section 8.3 of SigComp [1] which states that: '"Pushing" a
   value on the stack is an abbreviation for copying the value to
   stack[stack_fill] and then increasing stack_fill by 1.' and
   'stack_fill is an abbreviation for the 2-byte word at stack_location
   and stack_location + 1'.  In the very rare case that the value of
   stack_fill is 0xFFFF, the new value pushed onto the stack will be
   written to stack [0xFFFF] = stack_location.  Stack_fill must then be
   increased by 1, however, the value at stack_location and
   stack_location + 1 has just been updated.  To maintain the integrity
   of the stack with regard to over and underflow, stack_fill MUST not
   be re-read.  The original stack_fill value of 0xFFFF should be
   increased by 1 to 0x0000 and written back to stack_location and
   stack_location + 1 (which will overwrite the value that has been
   pushed onto the stack).
"

All comments appreciated.

Best regards,

Abbie

> -----Original Message-----
> From: Pekka Pessi [mailto:[email-masked]] 
> Sent: Thursday, June 23, 2005 4:45 PM
> To: Surtees, Abigail
> Cc: [email-masked]
> Subject: Re: [rohc] Use of the stack
> 
> 
> "Surtees, Abigail" <[email-masked]> writes:
> ...
> >Then increase stack_fill by 1, but stack_fill is the 2 byte word at
> >stack_location and stack_location + 1 which has just been updated.
> 
> >Should the value of stack_fill be re-read, or should the 
> original value
> >(0xFFFF) be incremented by 1?
> 
> I'd vote for incrementing original value and storing it in
> stack_fill (otherwise UDVM wll lose the stack underflow error,
> which is stack overflow in this case).
> 
> --Pekka
> 

_______________________________________________
Rohc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rohc