CS 320 Unit 7 IJVM Macroarchitecture

CS 320 Unit 7 IJVM Macroarchitecture - CS 320 Computer...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 320 Computer Architecture Spring 2008 Unit 7 IJVM Macroarchitecture Furman Haddix, Ph.D. Assistant Professor Minnesota State University
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unit 7 Objectives Use of stacks in microarchitectures and macroarchitectures The Integer Java Virtual Machine (IJVM) Compiling Integer Java onto IJVM Assembling IJVM
Background image of page 2
High-Level View of Unit 4 Start with simple Java statements executable on a stack machine Translate Java statements into IJVM assembly language IJVM is translated into parameterized microfunction calls (machine language instructions calls into control store) The microprogram translates the microfunction calls and parameters into executable microinstructions (control line settings). Simple Java Statements Compile Integer Java Virtual Machine Assemble Mic-1 Machine Code Interpret Mic-1 Microcode Jasmin (JVM Assembly Language) bytecode (JVM Machine Language)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Stacks: A Requirement for an ISA Stacks are used for local variable storage Local variables are need to support procedure calls Consider procedures A, B, C, and D. Why do some compilers limit the depth of calling trees? Procedure D local variable frame Procedure A local variable frame This does not consider the operand stack nor function parameters Use of a stack for storing local variables. (a) While A is active. (b) After A calls B . (c) After B calls C . (d) After C and B return and A calls D .
Background image of page 4
The Operand Stack is Used to Hold Intermediate Results a1 a2 a3 a3 2 f1 f2 f3 f1 + f2 + f3 SP LV Example: calculate a1 = a3 2 + f(a1, a2, a3) During execution of f( ) After execution of f( ) a1 a2 a3 a3 2 f( ) return SP LV After completion of HLL instruction a3 2 +a1+a2+a3 a2 a3 SP LV
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Stacks on Stacks Calling process stack a1 a2 a3 a3 2 f1 f2 f3 f1 + f2 + f3 Current process stack Operand stacks Local variable frames
Background image of page 6
IJVM Memory Model (Integer Java Virtual Machine) Constants, etc. set at compile time Max size computed at compile time Program repository (object code) Byte array Word arrays
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Invoking a Method as Seen by the Stack a1 a2 LV a n SP ILOAD a0 OBJREF SP ILOAD a1 p1 SP ILOAD a2 p2 SP ILOAD a3 p3 SP INVOKEVIRTUAL Caller's PC LV Called Method Local Variable Space Link Pointer Caller's LV SP Size computed at compile time
Background image of page 8
Calling a Method
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Unit 4 IJVM Macroarchitecture 10 Returning from Method as Seen by the Stack a1 a2 a n SP p1 p2 p3 IRETURN Caller's PC LV LV Called Method Local Variable Space Link Pointer Caller's LV SP Return Value
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 29

CS 320 Unit 7 IJVM Macroarchitecture - CS 320 Computer...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online