avr-llvm / llvm

[MERGED UPSTREAM] AVR backend for the LLVM compiler library
220 stars 21 forks source link

Support assembly directives #24

Closed dylanmckay closed 9 years ago

dylanmckay commented 9 years ago

Add support for all AVR assembly directives.


List of directives (source):

Directive Priority Description Status
BYTE High Reserve byte to a variable
CSEG High Code Segment
CSEGSIZE Program memory size
DB High Define constant byte(s)
DEF Define a symbolic name on a register
DEVICE Define which device to assemble for
DSEG High Data Segment
DW High Define Constant word(s)
ENDM, ENDMACRO End macro
EQU High Set a symbol equal to an expression
ESEG Medium EEPROM Segment
EXIT Exit from file
INCLUDE Medium Read source from another file
LIST Turn listfile generation on
LISTMAC Turn Macro expansion in list file on
MACRO Begin macro
NOLIST Turn listfile generation off
ORG High Set program origin
SET High Set a symbol to an expression
dylanmckay commented 9 years ago

I believe that most (if not all) are already handled by LLVM. I believe the hi8, lo8 macros are already handled by AVR-LLVM (see AVRMCExpr.h). Support for the hh8 macro may need to be added.

dylanmckay commented 9 years ago

In PR #105, it was shown that we are only missing two directives: .list and .nolist. They are also general to all GAS targets.

Closing, as these are not important, nor do they belong in this issue tracker.