MLRISC

MLRISC Contributors Requirements How to Obtain MLRISC

Overview

Problem Statement Contributions MLRISC Based Compiler MLRISC Intermediate Representation MLRisc Generation Back End Optimizations Register Allocation Machine Description Garbage Collection Safety System Integration Optimizations Graphical Interface Line Counts Systems Using MLRISC Future Work

System

Architecture of MLRISC The MLTREE Language MLTree Extensions MLTree Utilities Instruction Selection Assemblers Machine Code Emitters Delay Slot Filling Span Dependency Resolution The Graph Library The Graph Visualization Library Basic Compiler Graphs The MLRISC IR SSA Optimizations ILP Optimizations Optimizations for VLIW/EPIC Architectur... Register Allocator

Back Ends

The Alpha Back End The PA RISC Back End The Sparc Back End The Intel x86 Back End The PowerPC Back End The MIPS Back End The TI C6x Back End

Basic Types

Annotations Cells Cluster Client Defined Constants Client Defined Pseudo Ops Instructions Instruction Streams Label Expressions Labels Regions Regmap

# Client Defined Pseudo Ops

Client Defined Pseudo Ops

Introduction

## Introduction

Pseudo ops are client defined instruction stream markers. They can be used to represent assembly directives. Pseudo ops should satisfy the following signature:

     signature PSEUDO_OPS = sig
       type pseudo_op
       val toString : pseudo_op -> string
       val emitValue : {pOp:pseudo_op, loc:int, emit:Word8.word -> unit} -> unit
       val sizeOf : pseudo_op * int -> int
       val adjustLabels : pseudo_op * int -> bool
     end

The method that is required is:

- `toString` -- pretty printing the pseudo in assembly format.

When machine code generation is used, we also have to implement the following methods:

- `emitValue` -- emit value of pseudo op give current location counter and output stream. The value emitted should respect the endianness of the target machine.
- `sizeOf` -- Size of the pseudo op in bytes given the current location counter The location counter is provided in case some pseudo ops are dependent on alignment considerations.
- `adjustLabels` -- adjust the value of labels in the pseudo op given the current location counter.

These methods are involved during the span dependence resolution phase to determine the size and layout of the pseudo ops.

Lal George
Allen Leung

Generated by mltex2html
Last modified: Fri Oct 11 18:19:52 UTC 2019 by buildd@x86-grnet-02