Skip to content

Latest commit

 

History

History
 
 

I8085

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

I8085 backend

This is the experimental LLVM backend for the intel 8085 microprocessor.

Contents

1. Implemented Functionalities

2. Some implementation notes

3. Correctness

4. Disclaimer

5. Next on priority

6. Credits

Currently basic constructs such as , loading and storing variables, function call, branching statements, logical operations (and, or, xor) and two arithmetic operations such as addition and subtraction are implemented, for i8,i16,i32 integere types. Still far way to go.

  1. Arguments are passed via stack, and return value is stored in register.
  2. 8 bit integers are returned via A reg, 16 bit integers are returned via BC reg pair and 32 bit integers are returned via stack.

The output assembly is tested in open source 8085 simulators and assemblers. Codegen Tests are located here.

This 8085 backend is purely experimental and never tested with original hardware and never used in productional use cases.

  1. Linker/Loader implementation.
  2. Adding more arithmetic operations and floating point types.

This backend is inspired by LLVM backend for AVR 8 bit microcontroller. Some of the functionalities here is referred from there.