Services and Modeling for Embedded Software Development
Embecosm divider strip
  Next

Howto: Implementing LLVM Integrated Assembler

A Simple Guide

Simon Cook

Embecosm

Application Note 10. Issue 1

October 2012


Table of Contents

1. Introduction
1.1. Target Audience
1.2. Examples
1.3. Further Information
1.4. About Embecosm Application Notes
2. Integrated Assembler within LLVM
2.1. llvm-mc
3. Implementing Assembly Parser Support
3.1. LLVM Build System
3.2. archASMParser Class
3.3. archOperand Structure
3.4. Matching and Emitting Instructions
3.5. Parsing Registers and Immediates
3.6. Parsing Operands
3.7. Parsing Instructions
3.8. Testing
4. Implementing Instruction Encoding
4.1. Build System
4.2. Registration
4.3. Register Support Function
4.4. Encoding Instructions
4.5. Encoding Custom Operands
4.6. Testing
5. Implementing Instruction Decoding
5.1. TableGen Requirements
5.2. Build System
5.3. Integration
5.4. Disassembler
5.5. Variable Length Instructions
5.6. Decoding Register Classes
5.7. Decoding Custom Operands
5.8. Testing
6. Implementing ELF Object Writing
6.1. Build System
6.2. Defining Fixups and Relocations
6.3. Assembly Backend
6.4. ELF Object Writer
6.5. Testing
Glossary
References
Embecosm divider strip