Files
OpenCellular/core/minute-ia/include/math.h
Jaiber John a625b710c3 minute-ia: Enable x86 core for Intel ISH
Add intial minute-IA (x86) core to to enable the FW
to boot on Intel Integrated Sensor Hub (ISH).

BUG=chrome-os-partner:51851
BRANCH=None
TEST=`make buildall -j`

Change-Id: I4dcf841766f216cd00fb1d4214fae19ba5de5603
Signed-off-by: Jaiber John <jaiber.j.john@intel.com>
Signed-off-by: Alex Brill <alexander.brill@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/336443
Commit-Ready: Raj Mojumder <raj.mojumder@intel.com>
Tested-by: Raj Mojumder <raj.mojumder@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-10 20:07:36 -07:00

38 lines
609 B
C

/* Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Math utility functions for minute-IA */
#ifndef __CROS_EC_MATH_H
#define __CROS_EC_MATH_H
#ifdef CONFIG_FPU
static inline float sqrtf(float v)
{
float root;
asm volatile(
"fsqrt %0, %1"
: "=w" (root)
: "w" (v)
);
return root;
}
static inline float fabsf(float v)
{
float root;
asm volatile(
"fabs %0, %1"
: "=w" (root)
: "w" (v)
);
return root;
}
#endif /* CONFIG_FPU */
#endif /* __CROS_EC_MATH_H */