Class SVM_LOAD


public class SVM_LOAD extends SVM_Instruction

SVM-INSTRUCTION: LOAD objadr size

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

First, 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 in address resadr, resadr+1, ... and upwards are loaded and pushed onto 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 object address
    • size

      private final int size
      The value size
  • Constructor Details

    • SVM_LOAD

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

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