[PATCH 3/3] ARM: early_printk: use printascii() rather than printch()

Nicolas Pitre nicolas.pitre at linaro.org
Thu Nov 2 10:20:15 PDT 2017


On Thu, 2 Nov 2017, Russell King - ARM Linux wrote:

> On Thu, Nov 02, 2017 at 04:38:11PM +0000, Chris Brandt wrote:
> > On Thursday, November 02, 2017 1, Nicolas Pitre wrote:
> > > OK.. I wanted to get to the bottom of this. The gas documentation says:
> > > 
> > > |9.4.2.1 Instruction Set Syntax
> > > |..............................
> > > |
> > > |Two slightly different syntaxes are supported for ARM and THUMB
> > > |instructions.  The default, `divided', uses the old style where ARM and
> > > |THUMB instructions had their own, separate syntaxes.  The new,
> > > |`unified' syntax, which can be selected via the `.syntax' directive,
> > > |and has the following main features:
> > > |
> > > |   * Immediate operands do not require a `#' prefix.
> > 
> > Well there you go!
> > 
> > We all have "gratuitously broken binutils"
> > 
> > ;)
> 
> Yes!
> 
> What reason could there be to drop the well established norm of
> prefixing constants with "#" in ARM assembly, other than maybe
> political pressure?

Dunno. But I wouldn't mind it at all if such a "feature" was selectable 
*separately* from the others, or if it could be opted out from the 
unified syntax. As it is I don't see how to achieve that.

> There is another solution to this: I augment the patch system with an
> ARM assembly parser that detects this before it gets accepted,
> rejecting patches that omit the # for constants.  However, that is
> incomplete, because we now live in a world where ARM assembly gets
> added to the kernel via many different git trees.

I'd go for the ".syntax require_pound_literals" addition to the 
assembler.  That will make the solution available to everyone 
eventually.


Nicolas



More information about the linux-arm-kernel mailing list