1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright 2022, Kajol Jain, IBM Corp.
4 */
5
6#include <ppc-asm.h>
7
8	.text
9
10#define ITER_SHIFT	31
11
12FUNC_START(indirect_branch_loop)
13	li	r3, 1
14	sldi	r3, r3, ITER_SHIFT
15
161:	cmpdi	r3, 0
17	beqlr
18
19	addi	r3, r3, -1
20
21	ld	r4, 2f@got(%r2)
22	mtctr	r4
23	bctr
24
25	.balign 32
262:	b	1b
27
28FUNC_END(indirect_branch_loop)
29