mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
a9af0558b2
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
42 lines
1.0 KiB
ArmAsm
42 lines
1.0 KiB
ArmAsm
// RUN: llvm-mc -triple=aarch64-none-linux-gnu < %s | FileCheck %s
|
|
|
|
// CHECK: and x0, x1, #0xfffffffffffffffd
|
|
// CHECK: and x0, x1, #0xfffffffffffffffd
|
|
and x0, x1, #~2
|
|
bic x0, x1, #2
|
|
|
|
// CHECK: and w0, w1, #0xfffffffd
|
|
// CHECK: and w0, w1, #0xfffffffd
|
|
and w0, w1, #~2
|
|
bic w0, w1, #2
|
|
|
|
// CHECK: ands x0, x1, #0xfffffffffffffffd
|
|
// CHECK: ands x0, x1, #0xfffffffffffffffd
|
|
ands x0, x1, #~2
|
|
bics x0, x1, #2
|
|
|
|
// CHECK: ands w0, w1, #0xfffffffd
|
|
// CHECK: ands w0, w1, #0xfffffffd
|
|
ands w0, w1, #~2
|
|
bics w0, w1, #2
|
|
|
|
// CHECK: orr x0, x1, #0xfffffffffffffffd
|
|
// CHECK: orr x0, x1, #0xfffffffffffffffd
|
|
orr x0, x1, #~2
|
|
orn x0, x1, #2
|
|
|
|
// CHECK: orr w2, w1, #0xfffffffc
|
|
// CHECK: orr w2, w1, #0xfffffffc
|
|
orr w2, w1, #~3
|
|
orn w2, w1, #3
|
|
|
|
// CHECK: eor x0, x1, #0xfffffffffffffffd
|
|
// CHECK: eor x0, x1, #0xfffffffffffffffd
|
|
eor x0, x1, #~2
|
|
eon x0, x1, #2
|
|
|
|
// CHECK: eor w2, w1, #0xfffffffc
|
|
// CHECK: eor w2, w1, #0xfffffffc
|
|
eor w2, w1, #~3
|
|
eon w2, w1, #3
|