1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2021 ARM Limited.
3 // Original author: Mark Brown <broonie@kernel.org>
5 // Trivial syscall overhead benchmark.
7 // This is implemented in asm to ensure that we don't have any issues with
8 // system libraries using instructions that disrupt the test.
10 #include <asm/unistd.h>
11 #include "assembler.h"
15 .macro test_loop per_loop
31 // Main program entry point
34 puts "Iterations per test: "
41 // Test having never used SVE
45 // Check for SVE support - should use hwcap but that's hard in asm
46 mrs x0, ID_AA64PFR0_EL1
49 puts "System does not support SVE\n"
53 // Execute a SVE instruction
59 puts "SVE used once: "
62 // Use SVE per syscall
63 puts "SVE used per syscall: "
64 test_loop "rdvl x0, #8"