Changeset 8e7c9fe in mainline for uspace/lib/math/arch/ia64/include/libarch/math.h
- Timestamp:
- 2014-09-12T03:45:25Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c53b58e
- Parents:
- 3eb0c85 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/math/arch/ia64/include/libarch/math.h
r3eb0c85 r8e7c9fe 1 1 /* 2 * Copyright (c) 20 07Martin Decky2 * Copyright (c) 2014 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup mips6429 /** @addtogroup libmathia64 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #include <typedefs.h> 36 #include <smp/ipi.h> 37 #include <arch/smp/dorder.h> 35 #ifndef LIBMATH_ia64_MATH_H_ 36 #define LIBMATH_ia64_MATH_H_ 38 37 39 #define MSIM_DORDER_ADDRESS 0xffffffffb0000100 38 #include <mathtypes.h> 39 #include <mod.h> 40 #include <trunc.h> 41 #include <trig.h> 40 42 41 #ifdef CONFIG_SMP 43 static inline double fmod(double dividend, double divisor) 44 { 45 return double_mod(dividend, divisor); 46 } 42 47 43 void ipi_broadcast_arch(int ipi)48 static inline double trunc(double val) 44 49 { 45 *((volatile uint32_t *) MSIM_DORDER_ADDRESS) = 0x7fffffff; 50 double_t arg; 51 arg.val = val; 52 53 double_t ret; 54 ret.data = trunc_float64(arg.data); 55 56 return ret.val; 57 } 58 59 static inline double sin(double val) 60 { 61 return double_sin(val); 62 } 63 64 static inline double cos(double val) 65 { 66 return double_cos(val); 46 67 } 47 68 48 69 #endif 49 70 50 uint32_t dorder_cpuid(void)51 {52 return *((volatile uint32_t *) MSIM_DORDER_ADDRESS);53 }54 55 void dorder_ipi_ack(uint32_t mask)56 {57 *((volatile uint32_t *) (MSIM_DORDER_ADDRESS + 4)) = mask;58 }59 60 71 /** @} 61 72 */
Note:
See TracChangeset
for help on using the changeset viewer.