Class SVM_LOADA


public class SVM_LOADA extends SVM_Instruction

SVM-INSTRUCTION: LOADA objadr size

Runtime Stack
	..., oaddr(?), offset(?), index(?) →
	..., resadr, ofst

First, if the 'objadr.indexed' flag is set, the 'index' is popped off the Runtime stack and added to 'offset'.

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, 'resadr' and 'offset' are 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
    • offset

      private final int offset
      The extra offset
  • Constructor Details

    • SVM_LOADA

      public SVM_LOADA(ObjectAddress objadr, int offset)
      Construct a new SVM_LOADA instruction
      Parameters:
      objadr - the object address
      offset - the extra offset
    • SVM_LOADA

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