OSDN Git Service

[AArch64] Add logical alias instructions to MC AsmParser
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Thu, 10 Jul 2014 15:12:26 +0000 (15:12 +0000)
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Thu, 10 Jul 2014 15:12:26 +0000 (15:12 +0000)
commita9af0558b20482d012814e2e32ee6d26c0729731
tree4a190f0ca8e693d50e145ac9ba4d52804acd90e4
parent73118c41286084de76c9375e7ac40eb46cf40747
[AArch64] Add logical alias instructions to MC AsmParser

This patch teaches the AsmParser to accept some logical+immediate
instructions and convert them as shown:

  bic  Rd, Rn, #imm  ->  and Rd, Rn, #~imm
  bics Rd, Rn, #imm  ->  ands Rd, Rn, #~imm
  orn  Rd, Rn, #imm  ->  orr Rd, Rn, #~imm
  eon  Rd, Rn, #imm  ->  eor Rd, 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. For example, the bic construct is used by the linux kernel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212722 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64InstrFormats.td
lib/Target/AArch64/AArch64InstrInfo.td
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
test/MC/AArch64/alias-logicalimm.s [new file with mode: 0644]
test/MC/AArch64/basic-a64-diagnostics.s