[PATCH] [AArch64] Add add/sub/cmp/cmn aliases to MC AsmParser

Arnaud A. de Grandmaison arnaud.degrandmaison at arm.com
Mon Jul 14 12:00:56 PDT 2014


As I said before, most of those aliases are not part of the ARM ARM.

They have however always been supported and publicly documented by all ARM
compiler (version 4.1, 5.0, 5.0{1,2.34}) I have been able to look at, under
paragraph "Instruction substitution" in the assembler reference guide for
previous ARM architectures  :
> ARM & Thumb Instructions > General data processing Instruction > Operand2
as a constant

For the ARM compiler 6, which is based on llvm & clang and supports ARMv8,
we would also like to support those aliases (i.e. upstream them), so that
our users can switch seamlessly from the ARM compiler 6 to a stock
llvm+clang. Those aliases are of course also publicly documented in the
armasm reference guide, under :
 > A32 and T32 Instructions > Operand2 as a constant > Instruction
Substitution

There is definitely room for discussing whether this should be part of an
architecture reference manual  or an assembler reference manual.

Let me know if this addresses your concerns.

Cheers,
--
Arnaud A. de Grandmaison

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Arnaud A. de
Grandmaison
Sent: 12 July 2014 00:14
To: 'Tim Northover'; Renato Golin
Cc: LLVM Commits
Subject: RE: [PATCH] [AArch64] Add add/sub/cmp/cmn aliases to MC AsmParser

Only the cmn -> adds / cmp -> subs aliases  are part of the ARM ARM.

The other aliases, in this patch or my previous patch, do not appear in the
ARM ARM, because they are pseudos in ARM's parlance, i.e. cases that a
compiler would not generate by itself, but that assemblers should accept,
for compatibility between different assemblers. Those pseudos are used in
already existing hand written assembly code : for example, the bic with
immediate is used at several places in the linux kernel.

The goal  is to be able to assemble code which other assemblers do accept,
so that users can switch fully to llvm for their toolchain. I do not know if
such a compatibility document exists, so  let me check that ; but I agree
that this  document is necessary so that there is an official , reasonable
and documented common ground to support.  

Cheers,
--
Arnaud A. de Grandmaison

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Tim Northover
Sent: 11 July 2014 22:39
To: Renato Golin
Cc: LLVM Commits
Subject: Re: [PATCH] [AArch64] Add add/sub/cmp/cmn aliases to MC AsmParser

> It is possible that GCC already does that and maybe that's the reason 
> for the patch? (Arnaud?)

That almost certainly is the direct reason. But ARM should be strongly
encouraged to document it in the ARM ARM if it becomes some kind of de facto
standard (assuming it's not there already).

Cheers.

Tim.
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits







More information about the llvm-commits mailing list