Re: [edk2] [PATCH 05/26] ArmPkg: introduce ASM_FUNC, MOV32/MOV64 and ADRL/LDRL macros

2016-08-10 Thread Cohen, Eugene
> > Why does this work? In my experimentation the C preprocessor > would collapse the stuff onto a single line (the backslash being a > continuation on the preprocessor input, but preprocessor output > revealed the newlines being removed), thereby violating the assembly > requirement that labels

Re: [edk2] [PATCH 05/26] ArmPkg: introduce ASM_FUNC, MOV32/MOV64 and ADRL/LDRL macros

2016-08-10 Thread Ard Biesheuvel
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)

Re: [edk2] [PATCH 05/26] ArmPkg: introduce ASM_FUNC, MOV32/MOV64 and ADRL/LDRL macros

2016-08-10 Thread Cohen, Eugene
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