RTEMS CPU Kit with SuperCore  4.11.3
Macros | Functions | Variables
asm.h File Reference

Address the Problems Caused by Incompatible Flavor of Assemblers and Toolsets. More...

#include <rtems/score/cpuopts.h>
#include <rtems/score/avr.h>
#include <rtems/concat.h>
#include <avr/common.h>
Include dependency graph for asm.h:

Go to the source code of this file.

Macros

#define ASM
 
#define __USER_LABEL_PREFIX__   _
 
#define __REGISTER_PREFIX__
 
#define SYM(x)   CONCAT1 (__USER_LABEL_PREFIX__, x)
 
#define REG(x)   CONCAT1 (__REGISTER_PREFIX__, x)
 
#define BEGIN_CODE_DCL   .text
 
#define END_CODE_DCL
 
#define BEGIN_DATA_DCL   .data
 
#define END_DATA_DCL
 
#define BEGIN_CODE   .text
 
#define END_CODE
 
#define BEGIN_DATA
 
#define END_DATA
 
#define BEGIN_BSS
 
#define END_BSS
 
#define END
 
#define PUBLIC(sym)   .globl SYM (sym)
 
#define EXTERN(sym)   .globl SYM (sym)
 
#define _L   $
 
#define CONCAT1(a, b)   CONCAT2(a, b)
 
#define CONCAT2(a, b)   a ## b
 
#define _U(x)   CONCAT1(__USER_LABEL_PREFIX__, x)
 
#define _R(x)   CONCAT1(__REGISTER_PREFIX__, x)
 
#define r0   _R(r0)
 
#define r1   _R(r1)
 
#define r2   _R(r2)
 
#define r3   _R(r3)
 
#define r4   _R(r4)
 
#define r5   _R(r5)
 
#define r6   _R(r6)
 
#define r7   _R(r7)
 
#define r8   _R(r8)
 
#define r9   _R(r9)
 
#define r10   _R(r10)
 
#define r11   _R(r11)
 
#define r12   _R(r12)
 
#define r13   _R(r13)
 
#define r14   _R(r14)
 
#define r15   _R(r15)
 
#define r16   _R(r16)
 
#define r17   _R(r17)
 
#define r18   _R(r18)
 
#define r19   _R(r19)
 
#define r20   _R(r20)
 
#define r21   _R(r21)
 
#define r22   _R(r22)
 
#define r23   _R(r23)
 
#define r24   _R(r24)
 
#define r25   _R(r25)
 
#define r26   _R(r26)
 
#define r27   _R(r27)
 
#define r28   _R(r28)
 
#define r29   _R(r29)
 
#define r30   _R(r30)
 
#define r31   _R(r31)
 
#define __tmp_reg__   r0
 
#define __zero_reg__   r1
 
#define XJMP   rjmp
 
#define XCALL   rcall
 
#define PROLOGUE_SAVES(offset)   XJMP (__prologue_saves__ + 2 * (offset))
 
#define EPILOGUE_RESTORES(offset)   XJMP (__epilogue_restores__ + 2 * (offset))
 
#define BIG_CODE   0
 

Functions

Invalid X_movw arg endif if ((.L_movw_src) -(.L_movw_dst)) .if(((.L_movw_src)|(.L_movw_dst)) &0x01) .if(((.L_movw_src) -(.L_movw_dst)) &0x80) mov(.L_movw_dst)+1
 
Invalid X_movw arg endif L_movw_src mov (.L_movw_dst)
 

Variables

macro X_movw dst src L_movw_dst
 
macro X_movw dst src r0
 
macro X_movw dst src r1
 
macro X_movw dst src r2
 
macro X_movw dst src r3
 
macro X_movw dst src r4
 
macro X_movw dst src r5
 
macro X_movw dst src r6
 
macro X_movw dst src r7
 
macro X_movw dst src r8
 
macro X_movw dst src r9
 
macro X_movw dst src r10
 
macro X_movw dst src r11
 
macro X_movw dst src r12
 
macro X_movw dst src r13
 
macro X_movw dst src r14
 
macro X_movw dst src r15
 
macro X_movw dst src r16
 
macro X_movw dst src r17
 
macro X_movw dst src r18
 
macro X_movw dst src r19
 
macro X_movw dst src r20
 
macro X_movw dst src r21
 
macro X_movw dst src r22
 
macro X_movw dst src r23
 
macro X_movw dst src r24
 
macro X_movw dst src r25
 
macro X_movw dst src r26
 
macro X_movw dst src r27
 
macro X_movw dst src r28
 
macro X_movw dst src r29
 
macro X_movw dst src r30
 
macro X_movw dst src r31 ifc reg
 
macro X_movw dst src r31 ifc dst src L_movw_src
 
macro X_movw dst src r31 ifc dst src R0
 
macro X_movw dst src r31 ifc dst src R1
 
macro X_movw dst src r31 ifc dst src R2
 
macro X_movw dst src r31 ifc dst src R3
 
macro X_movw dst src r31 ifc dst src R4
 
macro X_movw dst src r31 ifc dst src R5
 
macro X_movw dst src r31 ifc dst src R6
 
macro X_movw dst src r31 ifc dst src R7
 
macro X_movw dst src r31 ifc dst src R8
 
macro X_movw dst src r31 ifc dst src R9
 
macro X_movw dst src r31 ifc dst src R10
 
macro X_movw dst src r31 ifc dst src R11
 
macro X_movw dst src r31 ifc dst src R12
 
macro X_movw dst src r31 ifc dst src R13
 
macro X_movw dst src r31 ifc dst src R14
 
macro X_movw dst src r31 ifc dst src R15
 
macro X_movw dst src r31 ifc dst src R16
 
macro X_movw dst src r31 ifc dst src R17
 
macro X_movw dst src r31 ifc dst src R18
 
macro X_movw dst src r31 ifc dst src R19
 
macro X_movw dst src r31 ifc dst src R20
 
macro X_movw dst src r31 ifc dst src R21
 
macro X_movw dst src r31 ifc dst src R22
 
macro X_movw dst src r31 ifc dst src R23
 
macro X_movw dst src r31 ifc dst src R24
 
macro X_movw dst src r31 ifc dst src R25
 
macro X_movw dst src r31 ifc dst src R26
 
macro X_movw dst src r31 ifc dst src R27
 
macro X_movw dst src r31 ifc dst src R28
 
macro X_movw dst src r31 ifc dst src R29
 
macro X_movw dst src r31 ifc dst src R30
 
Invalid X_movw arg endif L_movw_src L_movw_src else L_movw_src L_movw_src endif else L_movw_src L_movw_src endif endif endm macro X_lpm dst =r0
 
Invalid X_movw arg endif L_movw_src L_movw_src else L_movw_src L_movw_src endif else L_movw_src L_movw_src endif endif endm macro X_lpm src
 
Invalid X_movw arg endif L_movw_src L_movw_src else L_movw_src L_movw_src endif else L_movw_src L_movw_src endif endif endm macro X_lpm r31 ifc dst L_lpm_dst
 
Invalid dst arg of X_lpm macro endif L_lpm_src
 
Invalid dst arg of X_lpm macro endif z
 
Invalid dst arg of X_lpm macro endif Z
 

Detailed Description

Address the Problems Caused by Incompatible Flavor of Assemblers and Toolsets.

This include file attempts to address the problems caused by incompatible flavors of assemblers and toolsets. It primarily addresses variations in the use of leading underscores on symbols and the requirement that register names be preceded by a %.

Note
The spacing in the use of these macros is critical to them working as advertised.

Variable Documentation

◆ L_lpm_dst

Invalid X_movw arg endif L_movw_src L_movw_src else L_movw_src L_movw_src endif else L_movw_src L_movw_src endif endif endm macro X_lpm r31 ifc dst R31 ifc dst L_lpm_dst
Initial value:
= .L_lpm_n
.endif
.L_lpm_n = .L_lpm_n + 1
.endr
.L_lpm_n = 0
.irp reg

◆ L_lpm_src

Invalid dst arg of X_lpm macro endif Z ifc src L_lpm_src
Initial value:
= -1
.L_lpm_n = 0
.irp reg

◆ L_movw_dst

macro X_movw dst src r31 ifc dst src R31 ifc dst L_movw_dst
Initial value:
= -1
.L_movw_src = -1
.L_movw_n = 0
.irp reg

◆ L_movw_src

macro X_movw dst src r31 ifc dst src R31 ifc dst src L_movw_src
Initial value:
= .L_movw_n
.endif
.L_movw_n = .L_movw_n + 1
.endr
.L_movw_n = 0
.irp reg

◆ src

Invalid X_movw arg endif L_movw_src L_movw_src else L_movw_src L_movw_src endif else L_movw_src L_movw_src endif endif endm macro X_lpm src
Initial value:
=Z
.L_lpm_dst = -1
.L_lpm_n = 0
.irp reg