c55dabc6d5
The testcase uses "instructions" event to check if the Instruction filtering mode(IFM) bits are programmed correctly for indirect branch type. Testcase checks if IFM bits are programmed correctly to Monitor Mode Control Register A (MMCRA) via perf interface for ISA v3.1 platform. Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220610134113.62991-6-atrajeev@linux.vnet.ibm.com
29 lines
345 B
ArmAsm
29 lines
345 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright 2022, Kajol Jain, IBM Corp.
|
|
*/
|
|
|
|
#include <ppc-asm.h>
|
|
|
|
.text
|
|
|
|
#define ITER_SHIFT 31
|
|
|
|
FUNC_START(indirect_branch_loop)
|
|
li r3, 1
|
|
sldi r3, r3, ITER_SHIFT
|
|
|
|
1: cmpdi r3, 0
|
|
beqlr
|
|
|
|
addi r3, r3, -1
|
|
|
|
ld r4, 2f@got(%r2)
|
|
mtctr r4
|
|
bctr
|
|
|
|
.balign 32
|
|
2: b 1b
|
|
|
|
FUNC_END(indirect_branch_loop)
|