Skip to content

RFC ARM: assembler: Add uniform assembler framework

Dave Martin linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] ARM: assembler: Add uniform assembler framework
Quoted 12 lines · Russell King - ARM Linux
Quoted 10 lines · Dave Martin

#ifdef __ASSEMBLY__
stuff
for
the
assembler
#else
asm("stuff");
asm("for");
asm("the");
asm("assembler");

Quoted 3 lines

That's invalid - nothing guarantees that the compiler won't place anything in between these asm statements in the output assembly file.

Are you still interested in this series?

I have a workaround for the above now, but it's not pretty -- I seem to have opened a can of worms here.

We would need something like

#define EXTENDED_ASM(stuff) asm ( ".include \"macros.inc\"\n\t" stuff ) #define EXTENDED_VASM(stuff) asm volatile ( ".include \"macros.inc\"\n\t" stuff )

...where macros.inc includes some logic to protect against multiple inclusion.

This would avoid problems caused by reordering done by the compiler.

I think this can work, but it may be a step too far...

The above could help fix the incorrect way that asm/unified.h defines the it* macros (though admittedly that does not seem to have caused problems for anyone so far...)

Cheers
---Dave