56 lines · plain
1//===----------------------Hexagon builtin routine ------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9 .macro FUNCTION_BEGIN name10 .text11 .p2align 512 .globl \name13 .type \name, @function14\name:15 .endm16 17 .macro FUNCTION_END name18 .size \name, . - \name19 .endm20 21 22FUNCTION_BEGIN __hexagon_udivsi323 {24 r2 = cl0(r0)25 r3 = cl0(r1)26 r5:4 = combine(#1,#0)27 p0 = cmp.gtu(r1,r0)28 }29 {30 r6 = sub(r3,r2)31 r4 = r132 r1:0 = combine(r0,r4)33 if (p0) jumpr r3134 }35 {36 r3:2 = vlslw(r5:4,r6)37 loop0(1f,r6)38 }39 .falign401:41 {42 p0 = cmp.gtu(r2,r1)43 if (!p0.new) r1 = sub(r1,r2)44 if (!p0.new) r0 = add(r0,r3)45 r3:2 = vlsrw(r3:2,#1)46 }:endloop047 {48 p0 = cmp.gtu(r2,r1)49 if (!p0.new) r0 = add(r0,r3)50 jumpr r3151 }52FUNCTION_END __hexagon_udivsi353 54 .globl __qdsp_udivsi355 .set __qdsp_udivsi3, __hexagon_udivsi356