ArmPkg[all]  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AsmMacroIoLib.h File Reference

Macros

#define _ASM_FUNC(Name, Section)
 
#define ASM_FUNC(Name)   _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
 
#define MOV32(Reg, Val)
 
#define ADRL(Reg, Sym)
 
#define LDRL(Reg, Sym)
 

Detailed Description

Macros to work around lack of Apple support for LDR register, =expr

Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
Copyright (c) 2011-2012, ARM Ltd. All rights reserved.
Copyright (c) 2016, Linaro Ltd. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Macro Definition Documentation

#define _ASM_FUNC (   Name,
  Section 
)
Value:
.global Name ; \
.section #Section, "ax" ; \
.type Name, %function ; \
.p2align 2 ; \
Name:
#define ADRL (   Reg,
  Sym 
)
Value:
movw Reg, #:lower16:(Sym) - (. + 16) ; \
movt Reg, #:upper16:(Sym) - (. + 12) ; \
add Reg, Reg, pc
#define ASM_FUNC (   Name)    _ASM_FUNC(ASM_PFX(Name), .text. ## Name)
#define LDRL (   Reg,
  Sym 
)
Value:
movw Reg, #:lower16:(Sym) - (. + 16) ; \
movt Reg, #:upper16:(Sym) - (. + 12) ; \
ldr Reg, [pc, Reg]
#define MOV32 (   Reg,
  Val 
)
Value:
movw Reg, #(Val) & 0xffff ; \
movt Reg, #(Val) >> 16