================ @@ -1,408 +1,825 @@ -// RUN: llvm-mc -triple aarch64 -mattr=+lsui -show-encoding %s | FileCheck %s -// RUN: not llvm-mc -triple aarch64 -show-encoding %s 2>&1 | FileCheck %s --check-prefix=ERROR +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsui < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsui < %s \ +// RUN: | llvm-objdump -d --mattr=+lsui --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsui < %s \ +// RUN: | llvm-objdump -d --mattr=-lsui --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsui < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsui -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + + -_func: -// CHECK: _func: //------------------------------------------------------------------------------ // Unprivileged load/store operations //------------------------------------------------------------------------------ - ldtxr x9, [sp] -// CHECK: ldtxr x9, [sp] // encoding: [0xe9,0x7f,0x5f,0xc9] -// ERROR: error: instruction requires: lsui - ldtxr x9, [sp, #0] -// CHECK: ldtxr x9, [sp] // encoding: [0xe9,0x7f,0x5f,0xc9] -// ERROR: error: instruction requires: lsui - ldtxr x10, [x11] -// CHECK: ldtxr x10, [x11] // encoding: [0x6a,0x7d,0x5f,0xc9] -// ERROR: error: instruction requires: lsui - ldtxr x10, [x11, #0] -// CHECK: ldtxr x10, [x11] // encoding: [0x6a,0x7d,0x5f,0xc9] -// ERROR: error: instruction requires: lsui - - ldatxr x9, [sp] -// CHECK: ldatxr x9, [sp] // encoding: [0xe9,0xff,0x5f,0xc9] -// ERROR: error: instruction requires: lsui - ldatxr x10, [x11] -// CHECK: ldatxr x10, [x11] // encoding: [0x6a,0xfd,0x5f,0xc9] -// ERROR: error: instruction requires: lsui - - sttxr wzr, w4, [sp] -// CHECK: sttxr wzr, w4, [sp] // encoding: [0xe4,0x7f,0x1f,0x89] -// ERROR: error: instruction requires: lsui - sttxr wzr, w4, [sp, #0] -// CHECK: sttxr wzr, w4, [sp] // encoding: [0xe4,0x7f,0x1f,0x89] -// ERROR: error: instruction requires: lsui - sttxr w5, x6, [x7] -// CHECK: sttxr w5, x6, [x7] // encoding: [0xe6,0x7c,0x05,0xc9] -// ERROR: error: instruction requires: lsui - sttxr w5, x6, [x7, #0] -// CHECK: sttxr w5, x6, [x7] // encoding: [0xe6,0x7c,0x05,0xc9] -// ERROR: error: instruction requires: lsui - - stltxr w2, w4, [sp] -// CHECK: stltxr w2, w4, [sp] // encoding: [0xe4,0xff,0x02,0x89] -// ERROR: error: instruction requires: lsui - stltxr w5, x6, [x7] -// CHECK: stltxr w5, x6, [x7] // encoding: [0xe6,0xfc,0x05,0xc9] -// ERROR: error: instruction requires: lsui +ldtxr x9, [sp] +// CHECK-INST: ldtxr x9, [sp] +// CHECK-ENCODING: encoding: [0xe9,0x7f,0x5f,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c95f7fe9 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldtxr x9, [sp, #0] +// CHECK-INST: ldtxr x9, [sp] +// CHECK-ENCODING: encoding: [0xe9,0x7f,0x5f,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c95f7fe9 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldtxr x10, [x11] +// CHECK-INST: ldtxr x10, [x11] +// CHECK-ENCODING: encoding: [0x6a,0x7d,0x5f,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c95f7d6a <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldtxr x10, [x11, #0] +// CHECK-INST: ldtxr x10, [x11] +// CHECK-ENCODING: encoding: [0x6a,0x7d,0x5f,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c95f7d6a <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldatxr x9, [sp] +// CHECK-INST: ldatxr x9, [sp] +// CHECK-ENCODING: encoding: [0xe9,0xff,0x5f,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c95fffe9 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldatxr x10, [x11] +// CHECK-INST: ldatxr x10, [x11] +// CHECK-ENCODING: encoding: [0x6a,0xfd,0x5f,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c95ffd6a <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttxr wzr, w4, [sp] +// CHECK-INST: sttxr wzr, w4, [sp] +// CHECK-ENCODING: encoding: [0xe4,0x7f,0x1f,0x89] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: 891f7fe4 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttxr wzr, w4, [sp, #0] +// CHECK-INST: sttxr wzr, w4, [sp] +// CHECK-ENCODING: encoding: [0xe4,0x7f,0x1f,0x89] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: 891f7fe4 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttxr w5, x6, [x7] +// CHECK-INST: sttxr w5, x6, [x7] +// CHECK-ENCODING: encoding: [0xe6,0x7c,0x05,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c9057ce6 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttxr w5, x6, [x7, #0] +// CHECK-INST: sttxr w5, x6, [x7] +// CHECK-ENCODING: encoding: [0xe6,0x7c,0x05,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c9057ce6 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +stltxr w2, w4, [sp] +// CHECK-INST: stltxr w2, w4, [sp] +// CHECK-ENCODING: encoding: [0xe4,0xff,0x02,0x89] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: 8902ffe4 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +stltxr w5, x6, [x7] +// CHECK-INST: stltxr w5, x6, [x7] +// CHECK-ENCODING: encoding: [0xe6,0xfc,0x05,0xc9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: c905fce6 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui //------------------------------------------------------------------------------ // Unprivileged load/store register pair (offset) //------------------------------------------------------------------------------ - ldtp x21, x29, [x2, #504] -// CHECK: ldtp x21, x29, [x2, #504] // encoding: [0x55,0xf4,0x5f,0xe9] -// ERROR: instruction requires: lsui - ldtp x22, x23, [x3, #-512] -// CHECK: ldtp x22, x23, [x3, #-512] // encoding: [0x76,0x5c,0x60,0xe9] -// ERROR: instruction requires: lsui - ldtp x24, x25, [x4, #8] -// CHECK: ldtp x24, x25, [x4, #8] // encoding: [0x98,0xe4,0x40,0xe9] -// ERROR: instruction requires: lsui - - sttp x3, x5, [sp], #16 -// CHECK: sttp x3, x5, [sp], #16 // encoding: [0xe3,0x17,0x81,0xe8] -// ERROR: instruction requires: lsui - sttp x3, x5, [sp, #8]! -// CHECK: sttp x3, x5, [sp, #8]! // encoding: [0xe3,0x97,0x80,0xe9] -// ERROR: instruction requires: lsui - - sttp q3, q5, [sp] -// CHECK: sttp q3, q5, [sp] // encoding: [0xe3,0x17,0x00,0xed] -// ERROR: instruction requires: lsui - sttp q17, q19, [sp, #1008] -// CHECK: sttp q17, q19, [sp, #1008] // encoding: [0xf1,0xcf,0x1f,0xed] -// ERROR: instruction requires: lsui +ldtp x21, x29, [x2, #504] +// CHECK-INST: ldtp x21, x29, [x2, #504] +// CHECK-ENCODING: encoding: [0x55,0xf4,0x5f,0xe9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: e95ff455 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldtp x22, x23, [x3, #-512] +// CHECK-INST: ldtp x22, x23, [x3, #-512] +// CHECK-ENCODING: encoding: [0x76,0x5c,0x60,0xe9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: e9605c76 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +ldtp x24, x25, [x4, #8] +// CHECK-INST: ldtp x24, x25, [x4, #8] +// CHECK-ENCODING: encoding: [0x98,0xe4,0x40,0xe9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: e940e498 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttp x3, x5, [sp], #16 +// CHECK-INST: sttp x3, x5, [sp], #16 +// CHECK-ENCODING: encoding: [0xe3,0x17,0x81,0xe8] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: e88117e3 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttp x3, x5, [sp, #8]! +// CHECK-INST: sttp x3, x5, [sp, #8]! +// CHECK-ENCODING: encoding: [0xe3,0x97,0x80,0xe9] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: e98097e3 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttp q3, q5, [sp] +// CHECK-INST: sttp q3, q5, [sp] +// CHECK-ENCODING: encoding: [0xe3,0x17,0x00,0xed] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: ed0017e3 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui + +sttp q17, q19, [sp, #1008] +// CHECK-INST: sttp q17, q19, [sp, #1008] +// CHECK-ENCODING: encoding: [0xf1,0xcf,0x1f,0xed] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: ed1fcff1 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui //------------------------------------------------------------------------------ // Load/store register pair (post-indexed) //------------------------------------------------------------------------------ - ldtp x21, x29, [x2], #504 -// CHECK: ldtp x21, x29, [x2], #504 // encoding: [0x55,0xf4,0xdf,0xe8] -// ERROR: instruction requires: lsui - ldtp x22, x23, [x3], #-512 -// CHECK: ldtp x22, x23, [x3], #-512 // encoding: [0x76,0x5c,0xe0,0xe8] -// ERROR: instruction requires: lsui - ldtp x24, x25, [x4], #8 -// CHECK: ldtp x24, x25, [x4], #8 // encoding: [0x98,0xe4,0xc0,0xe8] -// ERROR: instruction requires: lsui - - sttp q3, q5, [sp], #0 -// CHECK: sttp q3, q5, [sp], #0 // encoding: [0xe3,0x17,0x80,0xec] -// ERROR: instruction requires: lsui - sttp q17, q19, [sp], #1008 -// CHECK: sttp q17, q19, [sp], #1008 // encoding: [0xf1,0xcf,0x9f,0xec] -// ERROR: instruction requires: lsui - ldtp q23, q29, [x1], #-1024 -// CHECK: ldtp q23, q29, [x1], #-1024 // encoding: [0x37,0x74,0xe0,0xec] -// ERROR: instruction requires: lsui +ldtp x21, x29, [x2], #504 +// CHECK-INST: ldtp x21, x29, [x2], #504 +// CHECK-ENCODING: encoding: [0x55,0xf4,0xdf,0xe8] +// CHECK-ERROR: error: instruction requires: lsui +// CHECK-UNKNOWN: e8dff455 <unknown> +// ERROR: :[[@LINE-3]]:3: error: instruction requires: lsui ---------------- jthackray wrote:
Thanks, done. https://github.com/llvm/llvm-project/pull/146331 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits