From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 89A8981D9C for ; Fri, 28 Oct 2016 08:22:00 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id n67so121460195wme.1 for ; Fri, 28 Oct 2016 08:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=m/apzSxOU6Sx8891nA84aIl3WlvoZrCYau4BIhBmmyw=; b=kFaZngyzjVkTmEbxMHIJxGHIYFH4Dh4YBAO+OCO7hZKKL8FVljd9JJubGSzeiN9jTc tt7u0Sw87441E8ty2WW/GPaj10SQj19EnGIELoGvcmL7KlbQqZUS02nGbDGreoVtJLuC zqUh930DzTHR/zvgniRiHzGXFph/os4drSljU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=m/apzSxOU6Sx8891nA84aIl3WlvoZrCYau4BIhBmmyw=; b=MB4g+8oGlumUvncaoqmur+xHqfcKLeYOkSoB9tCV1QzmYtpebQ8N6oKnK8iAHF1HH/ H5FoGuORhdxqM9qkBXZ9mlOorUTEQphpYfyrgNFwE8F8BPqA2rf8E8FRqNJ2dviMMTJk AK5TIG8bMOjQhh0Mhsvbgnin+BqhpqHh+0qgq8n6OKgna9C5Eub24Sr0OMWVHQfP/jPB GOeie2UTlcS72GWAj7xjaBm+KCHA/k0D1i6VexTputu7bd4DigeG+vY5VWT4iEtH7g9l 6n4S3VE7uq/R7+hxggwCUTLP2jADEnEHQb15L3NMdtqJSaJMiV9D4w9m98f8NlCSEHFf ZG/A== X-Gm-Message-State: ABUngveDTy7khNtWsaJTZyAVoVc1CtaLpkh1Bkll5ZCkGXUxAqd+v36zJR1aWNixjZIcHz6B X-Received: by 10.194.204.198 with SMTP id la6mr11956477wjc.2.1477668119648; Fri, 28 Oct 2016 08:21:59 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id k17sm9402407wmd.8.2016.10.28.08.21.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2016 08:21:58 -0700 (PDT) Date: Fri, 28 Oct 2016 16:21:57 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20161028152157.GC1161@bivouac.eciton.net> References: <1477654974-5598-1-git-send-email-ard.biesheuvel@linaro.org> <1477654974-5598-4-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <1477654974-5598-4-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [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 15:22:00 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 28, 2016 at 12:42:54PM +0100, Ard Biesheuvel wrote: > This is ancient cruft that is no longer used, so remove it. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > 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 >