1f50a7f3dSThomas Gleixner/* SPDX-License-Identifier: GPL-2.0-only */ 2cb96143dSMichael Ellerman/* 3cb96143dSMichael Ellerman * Copyright 2013, Michael Ellerman, IBM Corp. 4cb96143dSMichael Ellerman */ 5cb96143dSMichael Ellerman 60a6121cfSMichael Ellerman#include <ppc-asm.h> 70a6121cfSMichael Ellerman 8cb96143dSMichael Ellerman .text 9cb96143dSMichael Ellerman 100a6121cfSMichael EllermanFUNC_START(thirty_two_instruction_loop) 110a6121cfSMichael Ellerman cmpdi r3,0 12cb96143dSMichael Ellerman beqlr 130a6121cfSMichael Ellerman addi r4,r3,1 140a6121cfSMichael Ellerman addi r4,r4,1 150a6121cfSMichael Ellerman addi r4,r4,1 160a6121cfSMichael Ellerman addi r4,r4,1 170a6121cfSMichael Ellerman addi r4,r4,1 180a6121cfSMichael Ellerman addi r4,r4,1 190a6121cfSMichael Ellerman addi r4,r4,1 200a6121cfSMichael Ellerman addi r4,r4,1 210a6121cfSMichael Ellerman addi r4,r4,1 220a6121cfSMichael Ellerman addi r4,r4,1 230a6121cfSMichael Ellerman addi r4,r4,1 240a6121cfSMichael Ellerman addi r4,r4,1 250a6121cfSMichael Ellerman addi r4,r4,1 260a6121cfSMichael Ellerman addi r4,r4,1 270a6121cfSMichael Ellerman addi r4,r4,1 280a6121cfSMichael Ellerman addi r4,r4,1 290a6121cfSMichael Ellerman addi r4,r4,1 300a6121cfSMichael Ellerman addi r4,r4,1 310a6121cfSMichael Ellerman addi r4,r4,1 320a6121cfSMichael Ellerman addi r4,r4,1 330a6121cfSMichael Ellerman addi r4,r4,1 340a6121cfSMichael Ellerman addi r4,r4,1 350a6121cfSMichael Ellerman addi r4,r4,1 360a6121cfSMichael Ellerman addi r4,r4,1 370a6121cfSMichael Ellerman addi r4,r4,1 380a6121cfSMichael Ellerman addi r4,r4,1 390a6121cfSMichael Ellerman addi r4,r4,1 400a6121cfSMichael Ellerman addi r4,r4,1 # 28 addi's 410a6121cfSMichael Ellerman subi r3,r3,1 420a6121cfSMichael Ellerman b FUNC_NAME(thirty_two_instruction_loop) 430a6121cfSMichael EllermanFUNC_END(thirty_two_instruction_loop) 447481cad4SMichael Ellerman 457481cad4SMichael EllermanFUNC_START(thirty_two_instruction_loop_with_ll_sc) 467481cad4SMichael Ellerman cmpdi r3,0 477481cad4SMichael Ellerman beqlr 487481cad4SMichael Ellerman addi r5,r5,1 497481cad4SMichael Ellerman addi r5,r5,1 507481cad4SMichael Ellerman addi r5,r5,1 # 5 517481cad4SMichael Ellerman addi r5,r5,1 527481cad4SMichael Ellerman addi r5,r5,1 537481cad4SMichael Ellerman addi r5,r5,1 547481cad4SMichael Ellerman addi r5,r5,1 557481cad4SMichael Ellerman1: ldarx r6,0,r4 # 10 567481cad4SMichael Ellerman addi r5,r5,1 577481cad4SMichael Ellerman addi r5,r5,1 587481cad4SMichael Ellerman addi r5,r5,1 597481cad4SMichael Ellerman addi r5,r5,1 607481cad4SMichael Ellerman addi r5,r5,1 # 15 617481cad4SMichael Ellerman addi r5,r5,1 627481cad4SMichael Ellerman addi r5,r5,1 637481cad4SMichael Ellerman stdcx. r6,0,r4 647481cad4SMichael Ellerman bne- 1b 657481cad4SMichael Ellerman addi r5,r5,1 # 20 667481cad4SMichael Ellerman addi r5,r5,1 677481cad4SMichael Ellerman addi r5,r5,1 687481cad4SMichael Ellerman addi r5,r5,1 697481cad4SMichael Ellerman addi r5,r5,1 707481cad4SMichael Ellerman addi r5,r5,1 # 25 717481cad4SMichael Ellerman addi r5,r5,1 727481cad4SMichael Ellerman addi r5,r5,1 737481cad4SMichael Ellerman addi r5,r5,1 747481cad4SMichael Ellerman addi r5,r5,1 757481cad4SMichael Ellerman addi r5,r5,1 # 30 767481cad4SMichael Ellerman subi r3,r3,1 777481cad4SMichael Ellerman b FUNC_NAME(thirty_two_instruction_loop_with_ll_sc) 787481cad4SMichael EllermanFUNC_END(thirty_two_instruction_loop_with_ll_sc) 79