[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
// RUN: llvm-mc -triple=aarch64-none-linux-gnu < %s | FileCheck %s
|
2017-03-28 18:02:56 +08:00
|
|
|
// RUN: not llvm-mc -mattr=+no-neg-immediates -triple=aarch64-none-linux-gnu < %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-NEG-IMM
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
|
|
|
|
// CHECK: and x0, x1, #0xfffffffffffffffd
|
|
|
|
// CHECK: and x0, x1, #0xfffffffffffffffd
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
and x0, x1, #~2
|
|
|
|
bic x0, x1, #2
|
|
|
|
|
|
|
|
// CHECK: and w0, w1, #0xfffffffd
|
|
|
|
// CHECK: and w0, w1, #0xfffffffd
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
and w0, w1, #~2
|
|
|
|
bic w0, w1, #2
|
|
|
|
|
|
|
|
// CHECK: ands x0, x1, #0xfffffffffffffffd
|
|
|
|
// CHECK: ands x0, x1, #0xfffffffffffffffd
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
ands x0, x1, #~2
|
|
|
|
bics x0, x1, #2
|
|
|
|
|
|
|
|
// CHECK: ands w0, w1, #0xfffffffd
|
|
|
|
// CHECK: ands w0, w1, #0xfffffffd
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
ands w0, w1, #~2
|
|
|
|
bics w0, w1, #2
|
|
|
|
|
|
|
|
// CHECK: orr x0, x1, #0xfffffffffffffffd
|
|
|
|
// CHECK: orr x0, x1, #0xfffffffffffffffd
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
orr x0, x1, #~2
|
|
|
|
orn x0, x1, #2
|
|
|
|
|
|
|
|
// CHECK: orr w2, w1, #0xfffffffc
|
|
|
|
// CHECK: orr w2, w1, #0xfffffffc
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
orr w2, w1, #~3
|
|
|
|
orn w2, w1, #3
|
|
|
|
|
|
|
|
// CHECK: eor x0, x1, #0xfffffffffffffffd
|
|
|
|
// CHECK: eor x0, x1, #0xfffffffffffffffd
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
eor x0, x1, #~2
|
|
|
|
eon x0, x1, #2
|
|
|
|
|
|
|
|
// CHECK: eor w2, w1, #0xfffffffc
|
|
|
|
// CHECK: eor w2, w1, #0xfffffffc
|
2017-03-28 18:02:56 +08:00
|
|
|
// CHECK-NO-NEG-IMM: instruction requires: NegativeImmediates
|
[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.
llvm-svn: 212722
2014-07-10 23:12:26 +08:00
|
|
|
eor w2, w1, #~3
|
|
|
|
eon w2, w1, #3
|