]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Include/AsmMacroIoLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ArmPkg / Include / AsmMacroIoLib.h
index fb73ea9a46945b1f743a4b1d99999988a78b553c..2493a15b7b1b67ac94dc4cb84ddcc4680fff459e 100644 (file)
@@ -5,60 +5,21 @@
   Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
   Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
-\r
-#ifndef __MACRO_IO_LIB_H__\r
-#define __MACRO_IO_LIB_H__\r
-\r
-#if defined(__APPLE__)\r
-\r
-//\r
-//  ldr reg, =expr does not work with current Apple tool chain. So do the work our selves\r
-//\r
-\r
-// load _Reg with _Data\r
-#define LoadConstantToReg(_Data, _Reg)  \\r
-  ldr  _Reg, [pc, #0]   ;               \\r
-  b    1f               ;               \\r
-  .long (_Data)         ;               \\r
-1:\r
-\r
-#elif defined (__GNUC__)\r
-\r
-#define LoadConstantToReg(Data, Reg) \\r
-  ldr  Reg, =Data\r
-\r
-#else\r
-\r
-//\r
-// Use ARM assembly macros, form armasam\r
-//\r
-//  Less magic in the macros if ldr reg, =expr works\r
-//\r
-\r
-// load _Reg with _Data\r
-\r
-\r
-#define LoadConstantToReg(Data, Reg)  LoadConstantToRegMacro Data, Reg\r
-\r
-#endif\r
+#ifndef ASM_MACRO_IO_LIB_H_\r
+#define ASM_MACRO_IO_LIB_H_\r
 \r
 #define _ASM_FUNC(Name, Section)    \\r
   .global   Name                  ; \\r
   .section  #Section, "ax"        ; \\r
   .type     Name, %function       ; \\r
+  .p2align  2                     ; \\r
   Name:\r
 \r
-#define ASM_FUNC(Name)            _ASM_FUNC(ASM_PFX(Name), .text. ## Name)\r
+#define ASM_FUNC(Name)  _ASM_FUNC(ASM_PFX(Name), .text. ## Name)\r
 \r
 #define MOV32(Reg, Val)                       \\r
   movw      Reg, #(Val) & 0xffff            ; \\r
@@ -74,4 +35,4 @@
   movt      Reg, #:upper16:(Sym) - (. + 12) ; \\r
   ldr       Reg, [pc, Reg]\r
 \r
-#endif\r
+#endif // ASM_MACRO_IO_LIB_H_\r