aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>2015-07-01 15:05:58 +0000
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>2015-07-01 15:05:58 +0000
commit650c520007776789b07250484c335623feb376c9 (patch)
treef4fae9419d460d68f2f99d813cf4148e3ec4190f /clang/lib/CodeGen/CodeGenFunction.cpp
parent85b2815aba7136839524b61a96f397a526315da1 (diff)
downloadllvm-650c520007776789b07250484c335623feb376c9.zip
llvm-650c520007776789b07250484c335623feb376c9.tar.gz
llvm-650c520007776789b07250484c335623feb376c9.tar.bz2
[AArch64] Implement add/adds/sub/subs/cmp/cmn with negative immediate aliases
This patch teaches the AsmParser to accept add/adds/sub/subs/cmp/cmn with a negative immediate operand and convert them as shown: add Rd, Rn, -imm -> sub Rd, Rn, imm sub Rd, Rn, -imm -> add Rd, Rn, imm adds Rd, Rn, -imm -> subs Rd, Rn, imm subs Rd, Rn, -imm -> adds Rd, Rn, imm cmp Rn, -imm -> cmn Rn, imm cmn Rn, -imm -> cmp Rn, imm Those instructions are an alternate syntax available to assembly coders, and are needed in order to support code already compiling with some other assemblers (gas). They are documented in the "ARMv8 Instruction Set Overview", in the "Arithmetic (immediate)" section. This makes llvm-mc a programmer-friendly assembler ! This also fixes PR20978: "Assembly handling of adding negative numbers not as smart as gas". llvm-svn: 241166
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions