1 //===----------------------Hexagon builtin routine ------------------------===//
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-exception
7 //===----------------------------------------------------------------------===//
9 .macro FUNCTION_BEGIN name
13 .type \name, @function
17 .macro FUNCTION_END name
18 .size \name, . - \name
21 #define Q6_ALIAS(TAG) .global __qdsp_##TAG ; .set __qdsp_##TAG, __hexagon_##TAG
22 #define FAST_ALIAS(TAG) .global __hexagon_fast_##TAG ; .set __hexagon_fast_##TAG, __hexagon_##TAG
23 #define FAST2_ALIAS(TAG) .global __hexagon_fast2_##TAG ; .set __hexagon_fast2_##TAG, __hexagon_##TAG
25 FUNCTION_BEGIN __hexagon_divsf3
27 r2,p0 = sfrecipa(r0,r1)
29 r3 = ##0x3f800000 // 1.0
33 r3 -= sfmpy(r4,r2):lib // 1-(den/recip) yields error?
38 r2 += sfmpy(r3,r2):lib
44 r3 -= sfmpy(r4,r2):lib
45 r0 += sfmpy(r5,r2):lib
48 r2 += sfmpy(r3,r2):lib
49 r6 -= sfmpy(r0,r4):lib
52 r0 += sfmpy(r6,r2):lib
55 r5 -= sfmpy(r0,r4):lib
58 r0 += sfmpy(r5,r2,p0):scale
61 FUNCTION_END __hexagon_divsf3