Feature #9950

Support for different directives in text sections of test templates

Added by Mikhail Chupilko over 1 year ago. Updated over 1 year ago.

Template Processor
Target version:
Start date:
Due date:
% Done:


Estimated time:
Published in build:


The list of the assembler directives should to my mind include:
1) Data types
.ascii .byte .half .word .dword etc
2) Alignment types
3) Options
.option <option_name>


Updated by Alexander Kamkin over 1 year ago

  • Target version set to 2.4
  • Status changed from New to Open

Updated by Mikhail Chupilko over 1 year ago

Data Directives in RISC-V (as presented in

Directive Arguments Description
2byte 16-bit comma separated words (unaligned)
4byte 32-bit comma separated words (unaligned)
8byte 64-bit comma separated words (unaligned)
half 16-bit comma separated words (naturally aligned)
word 32-bit comma separated words (naturally aligned)
dword 64-bit comma separated words (naturally aligned)
byte 8-bit comma separated words
dtpreldword 64-bit thread local word
dtprelword 32-bit thread local word
sleb128 expression signed little endian base 128, DWARF
uleb128 expression unsigned little endian base 128, DWARF
asciz “string” emit string (alias for .string)
string “string” emit string
incbin “filename” emit the included file as a binary sequence of octets
zero integer zero bytes

Alignment Directives

Directive Arguments Description
align integer align to power of 2 (alias for .p2align)
balign b,[pad_val=0] byte align
p2align p2,[pad_val=0],max align to power of 2

Other Directives

Directive Arguments Description
option {rvc,norvc,pic,nopic,push,pop} RISC-V options

Updated by Alexander Kamkin over 1 year ago

  • Status changed from Open to Resolved
  • Category set to Template Processor

Implemented directives

As independent functions

  1. .align x[, pad_val]
  2. .balign x[, pad_val]
  3. .p2align x[, pad_val]
  4. .org x
  5. .option x

Via data_config in subprojects

  1. .2byte
  2. .4byte
  3. .8byte
  4. .asciz
  5. .string
  6. .zero

Updated by Alexander Kamkin over 1 year ago

  • Published in build set to 2.5.0-beta-191226
  • Target version changed from 2.4 to 2.5
  • Status changed from Resolved to Closed

Also available in: Atom PDF