brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · d90e778 Raw
52 lines · plain
1# RUN: llvm-mc %s -triple=riscv64 -mattr=+a,+zacas -M no-aliases -show-encoding \2# RUN:     | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s3# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a,+zacas < %s \4# RUN:     | llvm-objdump --mattr=+a,+zacas -M no-aliases -d -r - \5# RUN:     | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s6# RUN: not llvm-mc -triple=riscv64 -mattr=+a -show-encoding %s 2>&1 \7# RUN:        | FileCheck %s --check-prefix=CHECK-ERROR8 9# Odd register numbers for rd and rs2 are allowed for amocas.d on RV64.10 11# CHECK-ASM-AND-OBJ: amocas.d a1, a3, (a5)12# CHECK-ASM: encoding: [0xaf,0xb5,0xd7,0x28]13# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}14amocas.d a1, a3, (a5)15# CHECK-ASM-AND-OBJ: amocas.d.aq a1, a3, (a5)16# CHECK-ASM: encoding: [0xaf,0xb5,0xd7,0x2c]17# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}18amocas.d.aq a1, a3, (a5)19# CHECK-ASM-AND-OBJ: amocas.d.rl a1, a3, (a5)20# CHECK-ASM: encoding: [0xaf,0xb5,0xd7,0x2a]21# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}22amocas.d.rl a1, a3, (a5)23# CHECK-ASM-AND-OBJ: amocas.d.aqrl a1, a3, (a5)24# CHECK-ASM: encoding: [0xaf,0xb5,0xd7,0x2e]25# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}26amocas.d.aqrl a1, a3, (a5)27 28# CHECK-ASM-AND-OBJ: amocas.q a0, a2, (a1)29# CHECK-ASM: encoding: [0x2f,0xc5,0xc5,0x28]30# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}31amocas.q a0, a2, (a1)32# CHECK-ASM-AND-OBJ: amocas.q a0, a2, (a1)33# CHECK-ASM: encoding: [0x2f,0xc5,0xc5,0x28]34# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}35amocas.q a0, a2, 0(a1)36# CHECK-ASM-AND-OBJ: amocas.q zero, zero, (a1)37# CHECK-ASM: encoding: [0x2f,0xc0,0x05,0x28]38# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}39amocas.q zero, zero, (a1)40# CHECK-ASM-AND-OBJ: amocas.q.aq zero, zero, (a1)41# CHECK-ASM: encoding: [0x2f,0xc0,0x05,0x2c]42# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}43amocas.q.aq zero, zero, (a1)44# CHECK-ASM-AND-OBJ: amocas.q.rl zero, zero, (a1)45# CHECK-ASM: encoding: [0x2f,0xc0,0x05,0x2a]46# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}47amocas.q.rl zero, zero, (a1)48# CHECK-ASM-AND-OBJ: amocas.q.aqrl zero, zero, (a1)49# CHECK-ASM: encoding: [0x2f,0xc0,0x05,0x2e]50# CHECK-ERROR: instruction requires the following: 'Zacas' (Atomic Compare-And-Swap Instructions){{$}}51amocas.q.aqrl zero, zero, (a1)52