Class SVM_CALL
java.lang.Object
svm.instruction.SVM_Instruction
svm.instruction.SVM_CALL
SVM-INSTRUCTION: CALL rutadr returSlot
Runtime Stack ..., value1, value2, ... , value'nPar → ..., value1, value2, ... , value'exportSize
Link to GitHub: Source File.
- Author:
- S-Port: Definition of S-code, Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectAddressThe frame slot for the retur addressprivate final ProgramAddressThe routine addressFields inherited from class SVM_Instruction
iADD, iADDREG, iAND, iASSIGN, iCALL, iCALLSYS, iCOMPARE, iCONVERT, iDECO, iDIST, iDIV, iDUP, iENTER, iEQV, iGETO, iGOTO, iIMP, iINCO, iINITO, iJUMP, iJUMPIF, iLINE, iLOAD, iLOADA, iMax, iMULT, iNEG, iNOOP, iNOT, iOR, iPOPK, iPRECALL, iPUSHC, iPUSHLEN, iPUSHR, iREM, iRESTORE, iRETURN, iSAVE, iSETO, iSHIFT, iSTORE, iSUB, iSWITCH, iXOR, opcode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSVM_CALL(AttributeInputStream inpt) Construct an SVM_CALL instruction from the given input.SVM_CALL(ProgramAddress rutAddr, ObjectAddress returSlot) Construct a new SVM_CALL_SYS instruction -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Execute this SVM instructionstatic SVM_CALLofTOS(ObjectAddress returSlot) Returns a new SVM_CALL with the given 'returSlot'static SVM_Instructionread(AttributeInputStream inpt) Reads an SVM_CALL instruction from the given input.toString()voidwrite(AttributeOutputStream oupt) Write this SVM instruction to the given output.Methods inherited from class SVM_Instruction
edOpcode, readObject
-
Field Details
-
rutAddr
The routine address -
returSlot
The frame slot for the retur address
-
-
Constructor Details
-
SVM_CALL
Construct a new SVM_CALL_SYS instruction- Parameters:
rutAddr- the routine addressreturSlot- the frame slot for the return address
-
SVM_CALL
Construct an SVM_CALL instruction from the given input.- Parameters:
inpt- the input stream- Throws:
IOException- if IOException occur
-
-
Method Details
-
ofTOS
Returns a new SVM_CALL with the given 'returSlot'- Parameters:
returSlot- the frame slot for the return address- Returns:
- a new SVM_CALL with the given 'returSlot'
-
execute
public void execute()Description copied from class:SVM_InstructionExecute this SVM instruction- Overrides:
executein classSVM_Instruction
-
toString
-
write
Description copied from class:SVM_InstructionWrite this SVM instruction to the given output.- Overrides:
writein classSVM_Instruction- Parameters:
oupt- the output stream- Throws:
IOException- if IOException occur
-
read
Reads an SVM_CALL instruction from the given input.- Parameters:
inpt- the input stream- Returns:
- the SVM_CALL instruction read
- Throws:
IOException- if IOException occur
-