13.07.2015 Views

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 <strong>The</strong> Virtual Machine Instruction Set3.1 Format for the InstructionssipushPush two-byte signed integerSyntax:iipush = 17kite!byte?Java Virtual Machine instructions are represented in this document by an entry of the following form.Stack: ... =>iteminstruction nameShort description of the instructionSyntax:apcoile = numberoperuulIoperwir12Stack ...., mine!, (Anavolne3A longer description that explains the functions of the instruction and indicates any exceptions thatmight be thrown during execution.Each line in the syntax diagram represents a single 8-bit byte.Operations of the Java Virtual Machine most often take their operands from the stack and put their resultsback on the stack. As a convention, the descriptions do not usually mention when the stack is the source ordestination of an operation, but will always mention when it is not. For instance, the i load instruction has theshort description Toad integer from local variable." Implicitly, the integer Is loaded onto the stack. <strong>The</strong> i addinstruction is described as "Integer add"; both its source and destination are the stack.Instructions that do not affect the control flow of a computation may be assumed to always advance the virtualmachine pc to the opcode of the following instruction. Only instructions that do affect control flow willexplicitly mention the effect they have on pc.3.2 Pushing Constants onto the StackbipushPush one-byte signed integerSyntax:Stack => valisebipush = 16byte!byte! is interpreted as a signed 8-bit valise. This value is expanded to an integer and pushed onto theoperand stack.IdclIdc2byte] and byte2 are assembled into a signed 16-bit value. This value is expanded to an integer andpushed onto the operand stack.Nish item from constant poolSyntax:Stack: ......, itemhid = 18indexbyteindexlmtel is used as an unsigned 8-bit index into the constant pool of the current class <strong>The</strong> dem at thatindex is resolved and pushed onto the stack. If a String is being pushed and there isn't enoughmemory to allocate space (or it then an OutOf Memor yEr r or is thrown .Note: A String push results in a reference to an object; what other constants do, and explain thissomewhere here.Push item from constant poolSyntax .Stack: ......, itemIdt? = 19indeAb)ie Iindexbytel and indexhyte2 are used to construct an unsigned 16-bit index into the constant pool of thecurrent class. <strong>The</strong> item at that index is resolved and pushed onto the stack. If a St r i rig is beingpushed and there isn't enough memory to allocate space for it theta an outOf Mentor yEr r or isthrown.Note: A String push results in a reference to an object; what other constants do, and explain thissomewhere here.August 22, 1995 lust Virtual Mtchlne specification 27 Visual MA, issue SpeolicAtion assy, iltn 2) Isis

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!