blob: 6261c90ac9a0190bad413b64fdd00041716041ca [file] [log] [blame]
johpow0150ccb552020-11-10 19:22:13 -06001/*
2 * Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <asm_macros.S>
9#include <assert_macros.S>
10
11#ifdef __aarch64__
12
13 .arch armv8-a+sve
14 .globl sme_rdvl_1
15 .globl sme_try_illegal_instruction
16
17/*
18 * uint64_t sme_rdvl_1(void);
19 *
20 * Run rdvl instruction with imm #1.
21 */
22func sme_rdvl_1
23 rdvl x0, #1
24 ret
25endfunc sme_rdvl_1
26
27/*
28 * void sme_try_illegal_instruction(void);
29 *
30 * This function tests that illegal instructions are allowed to run when
31 * FA64 is supported. RDFFR is explicitly stated to be illegal in the SME
32 * specification section F1.1.2 unless FA64 is supported and enabled.
33 */
34func sme_try_illegal_instruction
35 rdffr p0.b
36 ret
37endfunc sme_try_illegal_instruction
38
39#endif /* __aarch64__ */