xref: /freebsd/sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_qmath.h (revision b4c3e9b5b09c829b4135aff738bd2893ed052377)
1*b4c3e9b5SBjoern A. Zeeb // SPDX-License-Identifier: ISC
2*b4c3e9b5SBjoern A. Zeeb /*
3*b4c3e9b5SBjoern A. Zeeb  * Copyright (c) 2010 Broadcom Corporation
4*b4c3e9b5SBjoern A. Zeeb  */
5*b4c3e9b5SBjoern A. Zeeb 
6*b4c3e9b5SBjoern A. Zeeb #ifndef _BRCM_QMATH_H_
7*b4c3e9b5SBjoern A. Zeeb #define _BRCM_QMATH_H_
8*b4c3e9b5SBjoern A. Zeeb 
9*b4c3e9b5SBjoern A. Zeeb #include <types.h>
10*b4c3e9b5SBjoern A. Zeeb 
11*b4c3e9b5SBjoern A. Zeeb u16 qm_mulu16(u16 op1, u16 op2);
12*b4c3e9b5SBjoern A. Zeeb 
13*b4c3e9b5SBjoern A. Zeeb s16 qm_muls16(s16 op1, s16 op2);
14*b4c3e9b5SBjoern A. Zeeb 
15*b4c3e9b5SBjoern A. Zeeb s32 qm_add32(s32 op1, s32 op2);
16*b4c3e9b5SBjoern A. Zeeb 
17*b4c3e9b5SBjoern A. Zeeb s16 qm_add16(s16 op1, s16 op2);
18*b4c3e9b5SBjoern A. Zeeb 
19*b4c3e9b5SBjoern A. Zeeb s16 qm_sub16(s16 op1, s16 op2);
20*b4c3e9b5SBjoern A. Zeeb 
21*b4c3e9b5SBjoern A. Zeeb s32 qm_shl32(s32 op, int shift);
22*b4c3e9b5SBjoern A. Zeeb 
23*b4c3e9b5SBjoern A. Zeeb s16 qm_shl16(s16 op, int shift);
24*b4c3e9b5SBjoern A. Zeeb 
25*b4c3e9b5SBjoern A. Zeeb s16 qm_shr16(s16 op, int shift);
26*b4c3e9b5SBjoern A. Zeeb 
27*b4c3e9b5SBjoern A. Zeeb s16 qm_norm32(s32 op);
28*b4c3e9b5SBjoern A. Zeeb 
29*b4c3e9b5SBjoern A. Zeeb void qm_log10(s32 N, s16 qN, s16 *log10N, s16 *qLog10N);
30*b4c3e9b5SBjoern A. Zeeb 
31*b4c3e9b5SBjoern A. Zeeb #endif				/* #ifndef _BRCM_QMATH_H_ */
32