Md. Zahurul Islam Center for Research on Bangla Language Processing (CRBLP) BRAC University.

Slides:



Advertisements
Similar presentations
Introduction to SPIM Simulator
Advertisements

1 Procedure Calls, Linking & Launching Applications Lecture 15 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Procedures in more detail. CMPE12cGabriel Hugh Elkaim 2 Why use procedures? –Code reuse –More readable code –Less code Microprocessors (and assembly languages)
1 Nested Procedures Procedures that don't call others are called leaf procedures, procedures that call others are called nested procedures. Problems may.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /17/2013 Lecture 12: Procedures Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
Ch. 8 Functions.
1 Computer Architecture MIPS Simulator and Assembly language.
CS 300 – Lecture 10 Intro to Computer Architecture / Assembly Language Strings and Characters and More.
Procedure call frame: Hold values passed to a procedure as arguments
Functions Functions and Parameters. History A function call needs to save the registers in use The called function will use the registers The registers.
Prof. Necula CS 164 Lecture 141 Run-time Environments Lecture 8.
RECITATION - 09/20/2010 BY SSESHADR Buflab. Agenda Reminders  Bomblab should be finished up  Exam 1 is on Tuesday 09/28/2010 Stack Discipline Buflab.
Intermediate code generation. Code Generation Create linear representation of program Result can be machine code, assembly code, code for an abstract.
CS 536 Spring Run-time organization Lecture 19.
CS 536 Spring Code generation I Lecture 20.
Intro to Computer Architecture
Procedure calls (1) The fact: Most programming languages support the concept of procedures (methods). Each method has its own local variables that are.
Chapter 16 Java Virtual Machine. To compile a java program in Simple.java, enter javac Simple.java javac outputs Simple.class, a file that contains bytecode.
Run-time Environment and Program Organization
UEE072HM. Embedded and Real-Time Systems We will mainly look at embedded systems –Systems which have the computer system embedded within their application.
5/6/99 Ashish Sabharwal1 JVM Architecture n Local storage area –Randomly accessible –Just like standard RAM –Stores variables (eg. an array) –Have to specify.
1 Memory Model of A Program, Methods Overview l Memory Model of JVM »Method Area »Heap »Stack.
CSC 494/594 C# and ASP.NET Programming. C# 2012 C# Object-oriented language with syntax that is similar to Java.
Universal Concepts of Programming Creating and Initializing local variables on the stack Variable Scope and Lifetime Stack Parameters Stack Frames Passing.
Fall 2008CS 334: Computer SecuritySlide #1 Smashing The Stack A detailed look at buffer overflows as described in Smashing the Stack for Fun and Profit.
MIPS coding. SPIM Some links can be found such as:
13/02/2009CA&O Lecture 04 by Engr. Umbreen Sabir Computer Architecture & Organization Instructions: Language of Computer Engr. Umbreen Sabir Computer Engineering.
ITEC 352 Lecture 20 JVM Intro. Functions + Assembly Review Questions? Project due today Activation record –How is it used?
LANGUAGE TRANSLATORS: WEEK 24 TRANSLATION TO ‘INTERMEDIATE’ CODE (overview) Labs this week: Tutorial Exercises on Code Generation.
Runtime Environments Compiler Construction Chapter 7.
1 Comp 104: Operating Systems Concepts Java Development and Run-Time Store Organisation.
Compiler Construction
Code Generation Gülfem Savrun Yeniçeri CS 142 (b) 02/26/2013.
Functions and Procedures. Function or Procedure u A separate piece of code u Possibly separately compiled u Located at some address in the memory used.
ITEC 352 Lecture 18 Functions in Assembly. Functions + Assembly Review Questions? Project due on Friday Exam –Average 76 Methods for functions in assembly.
CPSC 388 – Compiler Design and Construction Runtime Environments.
Lecture 18: 11/5/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Lecture 19: 11/7/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Procedure Basics Computer Organization I 1 October 2009 © McQuain, Feng & Ribbens Procedure Support From previous study of high-level languages,
Run-Time Storage Organization Compiler Design Lecture (03/23/98) Computer Science Rensselaer Polytechnic.
Levels of Abstraction Computer Organization. Level of Abstraction u Provides users with concepts/tools to solve problem at that level u Implementation.
Runtime Organization (Chapter 6) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
Runtime Organization (Chapter 6) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
More on MIPS programs n SPIM does not support everything supported by a general MIPS assembler. For example, –.end doesn’t work Use j $ra –.macro doesn’t.
ITEC 352 Lecture 19 Functions in Assembly. Functions + Assembly Review Questions? Project due on Friday Stacks Function activation / deactivation.
Programming Languages and Paradigms Activation Records in Java.
Bank Account Example public class BankAccount { private double balance; public static int totalAccounts = 0; public BankAccount() { balance = 0; totalAccounts++;
Programming Assignment 4 Code generator Md. Zahurul Islam Center for Research on Bangla Language Processing (CRBLP) BRAC University.
University of Amsterdam Computer Systems – the instruction set architecture Arnoud Visser 1 Computer Systems The instruction set architecture.
3-Apr-2006cse spim © 2006 DW Johnson and University of Washington1 SPIM simulator CSE 410, Spring 2006 Computer Systems
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
RealTimeSystems Lab Jong-Koo, Lim
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patternson and Hennessy Text.
Computer Architecture & Operations I
Storage Classes There are three places in memory where data may be placed: In Data section declared with .data in assembly language in C - Static) On the.
Computer Science 210 Computer Organization
Von Neumann model - Memory
Java Virtual Machine Complete subject details are available at:
Functions and Procedures
Assembly Programming using MIPS R3000 CPU
Installing and Using MARIE
Computer Programming Machine and Assembly.
Stack Frame Linkage.
5.6 Real-World Examples of ISAs
Installing and Using MARIE
Von Neumann model - Memory
Installing and Using MARIE
Assembly Programming using MIPS R3000 CPU
CSC 497/583 Advanced Topics in Computer Security
Presentation transcript:

Md. Zahurul Islam Center for Research on Bangla Language Processing (CRBLP) BRAC University

 Project Details  What to do?  New classes  Changes on previous program  Lvalue and Rvalue  MIPS

 Code Generator ◦ Intel Architecture (X86) ◦ MIPS Architecture ◦ Java Virtual Machine (JVM) ◦ Common Language runtime (CLR)  Our Target: MIPS Architecture  SPIM Simulator

 Download starter-kit  Find out what you have to do  Try to understand our starter-kit  Take a look on our given solution  Read MIPS references ◦ Online references on course website ◦ Computer architecture book  Lets start!

 Codegen.java ◦ Utility class for code generation  MIPSVisitor.java ◦ New visitor class to generate MIPS assembly code

 Symbol class changes ◦ getOffset() ◦ setOffset() ◦ symOffset  FunDeclAst changes ◦ FuncFrameSize ◦ setFrameSize() ◦ getFrameSize()  NameVisitor changes ◦ cuFrameOffset ◦ …

 Load (default)  Store  Manage it carefully

 Prolog  Epilog  Variables  Parameter  Arguments  Return value

 Stack ◦ Push ◦ pop  Registers ◦ Arguments ◦ Frame pointer ◦ Stack pointer ◦ Return address ◦ Return value

 Project Details  What to Do?  New classes  Changes on previous program  Lvalue and Rvalue  MIPS