From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CF70481D86 for ; Fri, 28 Oct 2016 04:43:08 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id 140so12870803wmv.1 for ; Fri, 28 Oct 2016 04:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K5mH4XzWiaHA9AQXwaw9wMPPK9kEXI6pRFKTm1Fk8Ss=; b=LvTOr8Onhp+6J9JSw7+Y9Z1O+zljBM/JDMYoICL7AQDVvlTVliyqp/9Lhr3pVf/3Vp 5joG9DZ3XjDwYp7MGdfw+3Ppx1o6Ve78q9m8R5ZOMHkQ3sGF2F4v1UvPUyWhbGzPji1d iZ1k2DiItUtUNYoLiD+P7BYeeMHFV+LkNZMto= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K5mH4XzWiaHA9AQXwaw9wMPPK9kEXI6pRFKTm1Fk8Ss=; b=SZbrvhOvJFSuAAJ5FchVbrPPsNEBKid9w+pkU8bKTU6r0dfZMvGX+Q2LPcOKhLgFes RD4dL6AE8WXFN6vt9As+7F/dZmP2V1nt7Z+im20UgfzRV2YTQfZ55KlD5YRFUUVQ6Yd9 /BPn6gxIzZLP5LQ86TWASmGl6yuPVZJ8Or7tBe1W9TbZZzlvMbNScNPn5GYX1KlGZ5ry 1oAepvAvZtsRwSZ0/Sc3h6PW+stqHlkBTScUMmd/joTj1AxbbYe5AYPeP7gQLpcTvW/Z uwIUSad1O8B2XGNwb/0BXUyWkbYtW6pBOn6fXdBennEH5B7MILKnvUcXjSMz7C2z/lPE /8dA== X-Gm-Message-State: ABUngvfIIJDyINbmrezlQnum938EC8nuLB0XWgX/57PexT12yGR7W6rqpNU756t5tpp4JV2k X-Received: by 10.194.57.195 with SMTP id k3mr12900335wjq.168.1477654986791; Fri, 28 Oct 2016 04:43:06 -0700 (PDT) Received: from localhost.localdomain ([105.150.227.229]) by smtp.gmail.com with ESMTPSA id 1sm8485220wmk.22.2016.10.28.04.43.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Oct 2016 04:43:06 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: Ard Biesheuvel Date: Fri, 28 Oct 2016 12:42:54 +0100 Message-Id: <1477654974-5598-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477654974-5598-1-git-send-email-ard.biesheuvel@linaro.org> References: <1477654974-5598-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 3/3] ArmPkg: remove LoadConstantXxx() asm macros X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 11:43:09 -0000 This is ancient cruft that is no longer used, so remove it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPkg/Include/AsmMacroIoLib.h | 33 -------------------- ArmPkg/Include/AsmMacroIoLib.inc | 10 ------ ArmPkg/Include/AsmMacroIoLibV8.h | 30 ------------------ 3 files changed, 73 deletions(-) diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/ArmPkg/Include/AsmMacroIoLib.h index 936e01e3388f..16d2a307291c 100644 --- a/ArmPkg/Include/AsmMacroIoLib.h +++ b/ArmPkg/Include/AsmMacroIoLib.h @@ -19,39 +19,6 @@ #ifndef __MACRO_IO_LIB_H__ #define __MACRO_IO_LIB_H__ -#if defined(__APPLE__) - -// -// ldr reg, =expr does not work with current Apple tool chain. So do the work our selves -// - -// load _Reg with _Data -#define LoadConstantToReg(_Data, _Reg) \ - ldr _Reg, [pc, #0] ; \ - b 1f ; \ - .long (_Data) ; \ -1: - -#elif defined (__GNUC__) - -#define LoadConstantToReg(Data, Reg) \ - ldr Reg, =Data - -#else - -// -// Use ARM assembly macros, form armasam -// -// Less magic in the macros if ldr reg, =expr works -// - -// load _Reg with _Data - - -#define LoadConstantToReg(Data, Reg) LoadConstantToRegMacro Data, Reg - -#endif - #define _ASM_FUNC(Name, Section) \ .global Name ; \ .section #Section, "ax" ; \ diff --git a/ArmPkg/Include/AsmMacroIoLib.inc b/ArmPkg/Include/AsmMacroIoLib.inc index 4bc3146fb399..ce7a1488daea 100644 --- a/ArmPkg/Include/AsmMacroIoLib.inc +++ b/ArmPkg/Include/AsmMacroIoLib.inc @@ -17,16 +17,6 @@ MACRO - LoadConstantMacro $Data - ldr r0, =($Data) - MEND - - MACRO - LoadConstantToRegMacro $Data, $Reg - ldr $Reg, =($Data) - MEND - - MACRO adrll $Reg, $Symbol add $Reg, pc, #-8 RELOC R_ARM_ALU_PC_G0_NC, $Symbol diff --git a/ArmPkg/Include/AsmMacroIoLibV8.h b/ArmPkg/Include/AsmMacroIoLibV8.h index e9285f78e7d6..db43d3b52e5a 100644 --- a/ArmPkg/Include/AsmMacroIoLibV8.h +++ b/ArmPkg/Include/AsmMacroIoLibV8.h @@ -42,36 +42,6 @@ cbnz SAFE_XREG, 1f ;\ b . ;// We should never get here -#if defined(__clang__) - -// load x0 with _Data -#define LoadConstant(_Data) \ - ldr x0, 1f ; \ - b 2f ; \ -.align(8) ; \ -1: \ - .8byte (_Data) ; \ -2: - -// load _Reg with _Data -#define LoadConstantToReg(_Data, _Reg) \ - ldr _Reg, 1f ; \ - b 2f ; \ -.align(8) ; \ -1: \ - .8byte (_Data) ; \ -2: - -#elif defined (__GNUC__) - -#define LoadConstant(Data) \ - ldr x0, =Data - -#define LoadConstantToReg(Data, Reg) \ - ldr Reg, =Data - -#endif // __GNUC__ - #define _ASM_FUNC(Name, Section) \ .global Name ; \ .section #Section, "ax" ; \ -- 2.7.4