Class SVM_STORE


public class SVM_STORE extends SVM_Instruction

SVM-INSTRUCTION: STORE objadr size

Runtime Stack
	..., value1, value2, ... , value'size, oaddr(?), offset(?), index(?) →
	..., value1, value2, ... , value'size

First, the values are popped off the Runtime stack and remembered.
If the 'objadr.indexed' flag is set, the 'index' is popped off and added to 'objadr'.
Then Force 'objadr' unstacked. Ie. pop off any stacked part and form the resulting address 'resadr'.

The unstacking of the 'objadr' depend on its address kind:

- REMOTE_ADDR: object address 'oaddr' is popped of the Runtime stack.
               resadr := oaddr + objadr.offset
- REFER_ADDR:  'offset' and object address 'oaddr' is popped of the Runtime stack.
               resadr := oaddr + objadr.offset + offset
- Otherwise:   resadr := objadr

Finally, the values are successively stored in address resadr, resadr+1, ... and upwards
without removing them from the Runtime stack.

Link to GitHub: Source File.

Author:
S-Port: Definition of S-code, Øystein Myhre Andersen
  • Field Details

    • objadr

      private final ObjectAddress objadr
      The target address
    • size

      private final int size
      The value size
  • Constructor Details

    • SVM_STORE

      public SVM_STORE(ObjectAddress objadr, int size)
      Construct a new SVM_STORE instruction
      Parameters:
      objadr - the target address
      size - the value size
    • SVM_STORE

      private SVM_STORE(AttributeInputStream inpt) throws IOException
      Construct SVM_STORE instruction from the given input.
      Parameters:
      inpt - the input stream
      Throws:
      IOException - if IOException occur
  • Method Details