From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 8FDAA1A1DF3 for ; Wed, 10 Aug 2016 11:29:04 -0700 (PDT) Received: by mail-it0-x229.google.com with SMTP id x130so52775373ite.1 for ; Wed, 10 Aug 2016 11:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cBjtr2cbTOpHPL7Yx3Wq6xn62g9f/GSDIiLrN7ksruA=; b=RLUoiSfSRB7lCunsx/4eeBpFCt9M3nwJrr2QzctTzyJeRWLIP2YgfRUyWTZ2kbAPp8 5YlQFiQkB5RNLNvuyiCJ74dYftN8GtooN/j/Y35PLMJ0jYpdrLzhmIfNeHSJm1tDF9P6 ZENgnB6vnfWECSipH/6QZExcU6EJLwQWANl5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cBjtr2cbTOpHPL7Yx3Wq6xn62g9f/GSDIiLrN7ksruA=; b=GlMPa+DzlRf/ens2Ew6b60j/sr2AGVDJBp4TuZN7m3qEjd3t3D4IRwgCelG/52ErdI kp5gLxPL60FaDP2R6FD2vm2N8Bxa1cgQWFBLt62tJuJAne7mcKjbbe4QjCWGo/U1TvBn pfrvcDJ/ePfnK3rANAXNJPBEiXVNT0zEC6docrOz58/mWUqu3iQ9QIu5T1MDd6/zTBTo DTTMbtyRHfOSrHHz1hcHRfvellRxNSI3rftsmPa40Am5hqwo0ZN5v4q7ITg4HNjPRgwu ULyo0FIPl6LWFixxtT56VmVIrl6QkqvJInXg5e5R8hXSSE0BL2S+oEBHdVWN3KdP2x28 sfbg== X-Gm-Message-State: AEkooutnfWlRnz/kTSAQ/GysOgRUHfnDFuzh0PY0eOBIbozok6s08dOMhpC+9uhF71QhiO0keSNUwv4uobdnQpd6 X-Received: by 10.36.57.215 with SMTP id l206mr5297219ita.5.1470853743959; Wed, 10 Aug 2016 11:29:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Wed, 10 Aug 2016 11:29:03 -0700 (PDT) In-Reply-To: References: <1470842282-8415-1-git-send-email-ard.biesheuvel@linaro.org> <1470842282-8415-6-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Wed, 10 Aug 2016 20:29:03 +0200 Message-ID: To: "Cohen, Eugene" Cc: "edk2-devel@lists.01.org" , "leif.lindholm@linaro.org" , "lersek@redhat.com" Subject: Re: [PATCH 05/26] ArmPkg: introduce ASM_FUNC, MOV32/MOV64 and ADRL/LDRL 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: Wed, 10 Aug 2016 18:29:04 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10 August 2016 at 20:26, Cohen, Eugene wrote: > Ard, > >> +#define _ASM_FUNC(Name, Section) \ >> + .global Name ; \ >> + .section #Section, "ax" ; \ >> + .type Name, %function ; \ >> + Name: >> + >> +#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), >> .text. ## Name) > > Why does this work? In my experimentation the C preprocessor would colla= pse the stuff onto a single line (the backslash being a continuation on the= preprocessor input, but preprocessor output revealed the newlines being re= moved), thereby violating the assembly requirement that labels appear in co= lumn 1. > I have tested this with both GNU as and Clang, and neither complains. Is this requirement documented anywhere? > Thanks for all your work on this, now I'm just trying to understand what = I'm looking at! > Sure, my pleasure :-)