A Microsoft.NET Front-End for GCC Bernhard Rabe Martin von Löwis Jan Möller Operating Systems & Middleware Group Hasso-Plattner-Institute, University of.

Slides:



Advertisements
Similar presentations
Decompilation of.NET bytecode Stephen Horne Trinity Hall 10 th February 2004 Computer Science Part II Project Progress Report
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Practical Malware Analysis
pa 1 Porting BETA to ROTOR ROTOR Projects Presentation Day, June by Peter Andersen.
A Process Splitting Transformation for Kahn Process Networks Sjoerd Meijer.
Written by: Dr. JJ Shepherd
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Intermediate Representation I High-Level to Low-Level IR Translation EECS 483 – Lecture 17 University of Michigan Monday, November 6, 2006.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Intermediate code generation. Code Generation Create linear representation of program Result can be machine code, assembly code, code for an abstract.
Modern Compiler Internal Representations Silvius Rus 1/23/2002.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Lego.Net Bernhard Rabe. Fischertechnik.NET ? Bernhard Rabe.
1 Lecture 2: MIPS Instruction Set Today’s topic:  MIPS instructions Reminder: sign up for the mailing list cs3810 Reminder: set up your CADE accounts.
History  We first begin with Java which was released in 1995 by Sun Microsystems  Initially Java was 100% interpreted at runtime and was very slow 
1 CMSC 132: Object-Oriented Programming II Java Constructs Department of Computer Science University of Maryland, College Park.
Reflection, Conversions, and Exceptions Tom Roeder CS fa.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
CIT241 Prerequisite Knowledge ◦ Variables ◦ Operators ◦ C++ Syntax ◦ Program Structure ◦ Classes  Basic Structure of a class  Concept of Data Hiding.
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Programming Languages and Paradigms Object-Oriented Programming.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
JVM And CLR Dan Agar April 16, Outline Java and.NET Design Philosophies Overview of Virtual Machines Technical Look at JVM and CLR Comparison of.
.NET Overview. 2 Objectives Introduce.NET –overview –languages –libraries –development and execution model Examine simple C# program.
Introduction to .NET Framework
Flex Compiler Compiler Case Study By Mee Ka Chang.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Adapted from Prof. Necula UCB CS 1641 Overview of COOL ICOM 4029 Lecture 2 ICOM 4029 Fall 2008.
ICD-C Compiler Framework Dr. Heiko Falk  H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions.
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
.NET Framework Danish Sami UG Lead.NetFoundry
Self-Contained CLI Assemblies Dipl.-Inf. Bernhard Rabe Operating Systems & Middleware Group Hasso-Plattner-Institute University of Potsdam.
Introduction to Object Oriented Programming CMSC 331.
CSE 425: Data Types I Data and Data Types Data may be more abstract than their representation –E.g., integer (unbounded) vs. 64-bit int (bounded) A language.
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
Parts of JAVA 1www.gowreeswar.com. Features of JAVA 2www.gowreeswar.com.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Object Oriented Software Development
.NET Security and MSIL Tom Roeder CS fa. MSIL Common intermediate language really CIL in ECMA standard MSIL is common name Very close to C# (and.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
MSIL C#.NET Software Development. MSIL AKA CIL What all.NET languages compile to What all.NET languages compile to Binary Intermediate Language Binary.
PerlNET: The Camel Talks.NET Jan Dubois The Perl Conference 6 San Diego, July 26 th 2002.
Introduction to Assembly Programming Computer Architecture.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Written by: Dr. JJ Shepherd
Chap. 10, Intermediate Representations J. H. Wang Dec. 27, 2011.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
The Execution System1. 2 Introduction Managed code and managed data qualify code or data that executes in cooperation with the execution engine The execution.
Software Systems Division (TEC-SW) ASSERT process & toolchain Maxime Perrotin, ESA.
Overview CNS 3260 C#.NET Software Development. 2.NET Framework Began in 2000 Developed in three years (2000 to 2003) Operating System Hardware.NET Framework.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Advanced.NET Programming I 7 th Lecture Pavel Ježek
A Single Intermediate Language That Supports Multiple Implemtntation of Exceptions Delvin Defoe Washington University in Saint Louis Department of Computer.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
.NET Security and MSIL Tom Roeder CS fa.
Why to use the assembly and why we need this course at all?
Microprocessor and Assembly Language
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
Array Array is a variable which holds multiple values (elements) of similar data types. All the values are having their own index with an array. Index.
CS360 Windows Programming
Programming in C# CHAPTER 1
Virtual Machines (Introduction to Virtual Machines)
Chap 1. Getting Started Objectives
Advanced .NET Programming I 9th Lecture
Intermediate Code Generating machine-independent intermediate form.
Presentation transcript:

A Microsoft.NET Front-End for GCC Bernhard Rabe Martin von Löwis Jan Möller Operating Systems & Middleware Group Hasso-Plattner-Institute, University of Potsdam

2.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Outline Motivation GCC CIL Front-End  Targets  Internals  Example  Status Conclusions

3.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Vision Extending the reach of Middleware Today What else?

4.NET Technologies'2006, Plzeň May 29 - June 1, 2006 GNU Compiler Collection Different programming languages (C, C++, Java, Ada,…) Various (micro)processor architectures (H8300, ARM, AVR, i386, …) Easy extensibility to new architectures C C++ Java Front-ends RTL Back-ends x86 asm arm asm mips asm GCC

5.NET Technologies'2006, Plzeň May 29 - June 1, 2006 CIL Front-End We use the “Portable.NET IL libraries” to read.NET assemblies Transforms IL code into GCC internal tree representation  memory layout of objects  vtables and emits RTL code for each method All.NET concepts except dynamic loading can be supported C++ C# VB.NET Compiler IL Assembly GCC x86 asm h8/300 asm

6.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Target platforms Lego Mindstorm Robots  Lego.NET RCX 2.0 (Renesas H8/300, 16Bit, 16 Mhz) 32K RAM no floating point support Real-Time Control System  Real-Time.Net Windows CE (x86,600 Mhz) Thread support (delegates) (Hard) real-time constraints (Higher Striker)

7.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Implementation Internals Runtime system for each supported target Mono application binary interface (ABI)  object layout (MonoObject)  string and array layout  vtable layout  method calling convention Floating point support (emulation or hardware if available) support only beforefieldinit classes  anytime before first access  initialization is done at program start

8.NET Technologies'2006, Plzeň May 29 - June 1, 2006 excerpt from example.cs c=a+b*3; tree nodes ldloc.0 ldloc.1 ldc.i4.3 mul add stloc.2 VAR_DECL LOC0 VAR_DECL LOC1 INTEGER_CST 3 MUL_EXPR

9.NET Technologies'2006, Plzeň May 29 - June 1, 2006 excerpt from example.cs c=a+b*3; tree nodes ldloc.0 ldloc.1 ldc.i4.3 mul add stloc.2 VAR_DECL LOC0 VAR_DECL LOC1 INTEGER_CST 3 MUL_EXPR ADD_EXPR

10.NET Technologies'2006, Plzeň May 29 - June 1, 2006 excerpt from example.cs c=a+b*3; tree nodes ldloc.0 ldloc.1 ldc.i4.3 mul add stloc.2 VAR_DECL LOC0 VAR_DECL LOC1 INTEGER_CST 3 MUL_EXPR ADD_EXPR VAR_DECL LOC2

11.NET Technologies'2006, Plzeň May 29 - June 1, 2006 excerpt from example.cs c=a+b*3; tree nodes ldloc.0 ldloc.1 ldc.i4.3 mul add stloc.2 VAR_DECL LOC0 VAR_DECL LOC1 INTEGER_CST 3 MUL_EXPR ADD_EXPR VAR_DECL LOC2 MODIFY_EXPR

12.NET Technologies'2006, Plzeň May 29 - June 1, 2006 excerpt from example.cs c=a+b*3; tree nodes ldloc.0 ldloc.1 ldc.i4.3 mul add stloc.2 VAR_DECL LOC0 VAR_DECL LOC1 INTEGER_CST 3 MUL_EXPR expand_expr(MODIFY_EXPR) Backend emits assembly language ADD_EXPR VAR_DECL LOC2 MODIFY_EXPR

13.NET Technologies'2006, Plzeň May 29 - June 1, 2006 gcc –O2 –S example.dll x86 Backend, excerpt from example.s movl12(%ebp), %eax; eax = b leal(%eax,%eax,2), %eax; eax = eax+2*eax addl8(%ebp), %eax; eax += a

14.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Supported Constructs primitive data types, enums classes, attributes (static, instance), properties, inheritance methods (static, instance), parameters, local variables and constructors arrays and strings delegates arithmetic operations control flow operations (conditional, unconditional branch, switch)

15.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Conclusions CIL front-end for GCC  Support for target processors not supported otherwise (commercial framework, or compact framework) Programming Lego Mindstorms Robots  Future Work  Real-time extensions (Real-Time.Net)  interfaces, reflection, exception handling  GC

16.NET Technologies'2006, Plzeň May 29 - June 1, 2006 Questions?