diff options
Diffstat (limited to 'core/cortex-m/fpu.c')
-rw-r--r-- | core/cortex-m/fpu.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/core/cortex-m/fpu.c b/core/cortex-m/fpu.c deleted file mode 100644 index 806b05438e..0000000000 --- a/core/cortex-m/fpu.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2012 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. - */ - -/* FPU module for Chrome EC operating system */ - -#include "task.h" - -void enable_fpu(void) -{ - interrupt_disable(); - asm volatile("mrs r0, control;" - "orr r0, r0, #(1 << 2);" - "msr control, r0;" - "isb;"); -} - -void disable_fpu(int32_t v) -{ - /* Optimization barrier to force compiler generate floating point - * calculation code for 'v' before disabling FPU. */ - asm volatile("" : : "r" (v) : "memory"); - asm volatile("mrs r0, control;" - "bic r0, r0, #(1 << 2);" - "msr control, r0;" - "isb;"); - interrupt_enable(); -} |