From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in4.apple.com (mail-out4.apple.com [17.151.62.26]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 04BA31A1E45 for ; Tue, 13 Sep 2016 10:52:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1473789130; x=2337702730; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uLmkQ9ML5Wa5SFdvWPjfkvhPBGzpXVpcnPkTilCLhoM=; b=cZItCb/aQeHINSmFqL8UMsxnLoJLomnSznAWh43+HeyOdknfuo9x/H6OPBCy4ElG OzltfSlsJHReQZZIlP4r7fEWXhPU7ryhKTmRXL3dqVrHtAruO1jpe1jCroZMQbhy xeom1yemyyQm4gseEqrAy0tIwJq9krEnLe4hWeo8htawXZKBtYclC3pXKOdDnGLr dIDcyjP8Gh0hsqcIKEpf8fRYpYhnKSumqeQx4ylEZsbVg+Zw76/bBGLgWalUfoq6 29odtAl6QcvGUdLyi3RMqXLyIhm7qlDmzrBFtxbMis5YikAdzNwBh8rllki2unNK v8ROkjKJR4D8e4YIs2RJkw==; Received: from relay6.apple.com (relay6.apple.com [17.128.113.90]) by mail-in4.apple.com (Apple Secure Mail Relay) with SMTP id 2E.86.07433.ACC38D75; Tue, 13 Sep 2016 10:52:10 -0700 (PDT) X-AuditID: 11973e12-f79b16d000001d09-da-57d83cca2e4b Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by relay6.apple.com (Apple SCV relay) with SMTP id B4.2F.23613.ACC38D75; Tue, 13 Sep 2016 10:52:10 -0700 (PDT) MIME-version: 1.0 Received: from da0601a-dhcp140.apple.com ([17.226.15.140]) by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPSA id <0ODG00JZTEYXR350@nwk-mmpp-sz13.apple.com>; Tue, 13 Sep 2016 10:52:10 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Tue, 13 Sep 2016 10:52:09 -0700 Cc: edk2-devel-01 , Leif Lindholm Message-id: <06BEACD5-4FB1-45E8-8259-DBE00F86D629@apple.com> References: <1473787620-26953-1-git-send-email-ard.biesheuvel@linaro.org> To: Ard Biesheuvel X-Mailer: Apple Mail (2.3112) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRmVeSWpSXmKPExsUi2FAYpXvK5ka4QddeeYv/H3YzWuw5dJTZ 4tPuPSwOzB53ru1h8+ie/Y8lgCmKyyYlNSezLLVI3y6BK+P6MbeCDXwV23Z2szYwruLuYuTg kBAwkeg8K9XFyAlkiklcuLeerYuRi0NIYC+jxPEJMxghEiYSF6+9YIZIHGKUeNA6gQkkwSsg KPFj8j0WkEHMAvISB8/LgoSZBbQkvj9qZYGo72GSaP47nQ0kISwgLvHuzCZmCDtKYv3mqWBz 2ASUJVbM/8AOYnMKBEuc2zGbFcRmEVCV2H5iHgvE0HCJR3MeQO21kdjw/SMjxILDjBKbb9xk BDlCREBPoqXLDOJoWYl9GxaAfSMhsINN4n//VbYJjCKzkNw9C+HuWUjuXsDIvIpRKDcxM0c3 M89EL7GgICdVLzk/dxMjKPCn2wntYDy1yuoQowAHoxIPb8CP6+FCrIllxZW5hxilOViUxHmX BgKFBNITS1KzU1MLUovii0pzUosPMTJxcEo1MOavZ/2kVKW+5YLhfJeOBQ8zr9jIBkWxBu34 y7Hi5wQr0Ze7RR3vT99tqrS57EuNKd8L55WhU+4meEkpd2968lkheGPJrmOyhtIFac+C19xJ nDt12toWJeXIgumPWJcJPwiaejk3IlDBvfX6euFT0yN4zx948qGUcc4y06zpt3ac+cIQpLvy xBolluKMREMt5qLiRAB3fGyGXQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42IRbCi+oXvK5ka4wcsZ0hb/P+xmtNhz6Ciz xafde1gcmD3uXNvD5tE9+x9LAFMUl01Kak5mWWqRvl0CV8b1Y24FG/gqtu3sZm1gXMXdxcjJ ISFgInHx2gtmCFtM4sK99WxdjFwcQgKHGCUetE5gAknwCghK/Jh8j6WLkYODWUBe4uB5WZAw s4CWxPdHrSwQ9T1MEs1/p7OBJIQFxCXendnEDGFHSazfPBVsDpuAssSK+R/YQWxOgWCJcztm s4LYLAKqEttPzGOBGBou8WjOA6i9NhIbvn9khFhwmFFi842bjCBHiAjoSbR0mUEcLSuxb8MC tgmMgrOQnDoL4dRZSE5dwMi8ilGgKDUnsdJML7GgICdVLzk/dxMjOFQLo3YwNiy3OsQowMGo xMMb8ON6uBBrYllxZS4wLDiYlUR4n1jfCBfiTUmsrEotyo8vKs1JLT7EmAx0/0RmKdHkfGAc 5ZXEG5qYGJgYG5sZG5ubmJMmrCTOK6UGtFUgPbEkNTs1tSC1CGYLEwenVANjbYplZLJcmFdp Y94yi8i+iO+ej72mVy4/uqF+//83LXpnX04uZtPcY+IYeniisuLRF/Jfojpyk9Q+b1FyjJ7q t+rMImaJwOc5CbI9U3/EMUjW786+0FF3qOfSvq2znmzkf8g/xUiP9fqfjqCY6a+XMeg/bOC6 uOnHNc8rU6+4BMYHt8StbfqtxFKckWioxVxUnAgA7sQUe5kCAAA= Subject: Re: [PATCH 2/2] ArmPkg/AsmMacroIoLib: force word alignment for functions 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: Tue, 13 Sep 2016 17:52:11 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Sep 13, 2016, at 10:49 AM, Ard Biesheuvel wrote: > > On 13 September 2016 at 18:45, Andrew Fish wrote: >> >>> On Sep 13, 2016, at 10:27 AM, Ard Biesheuvel wrote: >>> >>> Without an explicit .align directive, the Clang assembler defaults to >>> no alignment, which may result in instructions appearing misaligned in >>> the final executable. So use word alignment in all cases. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Ard Biesheuvel >>> --- >>> ArmPkg/Include/AsmMacroIoLib.h | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/ArmPkg/Include/AsmMacroIoLib.h >>> index fb73ea9a4694..5e4de1f269c8 100644 >>> --- a/ArmPkg/Include/AsmMacroIoLib.h >>> +++ b/ArmPkg/Include/AsmMacroIoLib.h >>> @@ -56,6 +56,7 @@ >>> .global Name ; \ >>> .section #Section, "ax" ; \ >>> .type Name, %function ; \ >>> + .align 2 ; \ >> >> Ard, >> >> I've been burned in the past by as .align is bytes or power of 2 based on what the native assembler defaults to (over simplification). I'm not sure if that issues exists in the ARM world? >> > > The GNU assembler for ARM interprets this as power-of-2, and so does > Clang, according to my testing. Both support the .p2align directive as > well, which makes it 100% unambiguous, so I suppose I could use that > instead. > I think all my pain has been the inconsistency on i386/IA32, but it left a mark. :). Thanks, Andrew Fish > -- > Ard. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel