/* ** Copyright 2003-2010, VisualOn, Inc. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ /******************************************************************************* File: oper_32b.h Content: Double precision operations *******************************************************************************/ #ifndef __OPER_32b_H #define __OPER_32b_H #include "typedef.h" #ifdef __cplusplus extern "C" { #endif #define POW2_TABLE_BITS 8 #define POW2_TABLE_SIZE (1<> 16); l_var_out = (long)swLow1 * (long)var1 >> 15; l_var_out += swHigh1 * var1 << 1; return(l_var_out); } __inline Word32 L_mpy_wx(Word32 L_var2, Word16 var1) { #if ARMV5TE_L_MPY_LS Word32 result; asm volatile( "SMULWB %[result], %[L_var2], %[var1] \n" :[result]"=r"(result) :[L_var2]"r"(L_var2), [var1]"r"(var1) ); return result; #else unsigned short swLow1; Word16 swHigh1; Word32 l_var_out; swLow1 = (unsigned short)(L_var2); swHigh1 = (Word16)(L_var2 >> 16); l_var_out = (long)swLow1 * (long)var1 >> 16; l_var_out += swHigh1 * var1; return(l_var_out); #endif } #ifdef __cplusplus } #endif #endif