📄 vfpasm.s
字号:
;
; The content of this file or document is CONFIDENTIAL and PROPRIETARY
; to Jade Technologies Co., Ltd. It is subjected to the terms of a
; License Agreement between Licensee and Jade Technologies Co., Ltd.
; restricting among other things, the use, reproduction, distribution
; and transfer. Each of the embodiments, including this information
; and any derivative work shall retain this copyright notice.
;
; Copyright (c) 2004 - 2005 Jade Technologies Co., Ltd.
; All rights reserved.
; ----------------------------------------------------------------
; File: vfpasm.s,v
; Revision: 1.0
; ----------------------------------------------------------------
; $
;
; This source code is licensed under Microsoft Shared Source License
; Version 1.0 for Windows CE.
; For a copy of the license visit http://go.microsoft.com/fwlink/?LinkId=3223.
;
OPT 2 ; disable listing
INCLUDE kxarm.h
INCLUDE armmacros.inc
OPT 1 ; reenable listing
;
; nMaxRegs gives the number of OS allocated space for control registers.
; currently it's defined to be 8. If we ever need more than that, we'll
; need to allocate space ourselves to save extra registers.
;
; OS will save/restore the standard VFP5TE control registers (fpexc, and fpscr)
; and will call into OAL to save/restore other implementation defined registers.
; For VFP10, the only register needs to be saved is FPINST
;
FPINST_REG EQU 0
;----------------------------------------------------------------
; BOOL CPUHasVFP (void);
; ** NOTE: This is a place holder function, VFP is not supported
; in this BSP
;----------------------------------------------------------------
NESTED_ENTRY CPUHasVFP
PROLOG_END
mov r0, #0
RETURN
ENTRY_END CPUHasVFP
;----------------------------------------------------------------
; void EnableVFP (void);
; ** NOTE: This is a place holder function, VFP is not supported
; in this BSP
;----------------------------------------------------------------
NESTED_ENTRY EnableVFP
PROLOG_END
RETURN
ENTRY_END CPUHasVFP
;----------------------------------------------------------------
; void VFP10SaveCtrlRegs (LPDWORD lpExtra, int nMaxRegs);
;----------------------------------------------------------------
LEAF_ENTRY VFP10SaveCtrlRegs
DCD 0xeef92a10 ; fmrx r2, fpinst
str r2, [r0, #FPINST_REG]
RETURN
ENTRY_END VFP10SaveCtrlRegs
;----------------------------------------------------------------
; void VFP10RestoreCtrlRegs (LPDWORD lpExtra, int nMaxRegs);
;----------------------------------------------------------------
LEAF_ENTRY VFP10RestoreCtrlRegs
ldr r2, [r0, #FPINST_REG]
DCD 0xeee92a10 ; fmxr fpinst, r2
RETURN
ENTRY_END VFP10RestoreCtrlRegs
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -