Make the ARM, Ltd. floating point emulator work w/ ELF.
This commit is contained in:
parent
35a01e1ce7
commit
c5269c1608
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.arm,v 1.43 2001/11/24 01:26:24 thorpej Exp $
|
||||
# $NetBSD: files.arm,v 1.44 2001/11/24 03:39:17 thorpej Exp $
|
||||
|
||||
# temporary define to allow easy moving to ../arch/arm/arm32
|
||||
defopt ARM32
|
||||
|
@ -13,7 +13,7 @@ defopt opt_cputypes.h CPU_ARM6 CPU_ARM7 CPU_ARM7TDMI CPU_ARM8
|
|||
defopt ARMFPE
|
||||
file arch/arm/fpe-arm/armfpe_glue.S armfpe
|
||||
file arch/arm/fpe-arm/armfpe_init.c armfpe
|
||||
file arch/arm/fpe-arm/armfpe.s armfpe
|
||||
file arch/arm/fpe-arm/armfpe.S armfpe
|
||||
|
||||
# PMAP_DEBUG (heavily abused option)
|
||||
defopt PMAP_DEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: armfpe.s,v 1.1 2001/11/24 01:26:24 thorpej Exp $ */
|
||||
/* $NetBSD: armfpe.S,v 1.1 2001/11/24 03:39:17 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Neil A Carson.
|
||||
|
@ -43,92 +43,76 @@
|
|||
* Created : 03/08/96
|
||||
*/
|
||||
|
||||
#include <arm/asm.h>
|
||||
|
||||
/*
|
||||
* DO NOT MODIFY - THIS FILE IS AUTOMATICALLY GENERATED
|
||||
*/
|
||||
|
||||
/* Generated from kernelfpe by ftv@voyager */
|
||||
/* hand-modified for ELF by thorpej@wasabisystems.com */
|
||||
|
||||
.text
|
||||
|
||||
.global _fpe_arm_start /* ARM FPE start address */
|
||||
_fpe_arm_start:
|
||||
.global _C_LABEL(fpe_arm_start) /* ARM FPE start address */
|
||||
_C_LABEL(fpe_arm_start):
|
||||
|
||||
.global _fpe_arm_header /* ARM FPE header address */
|
||||
_fpe_arm_header:
|
||||
.global _C_LABEL(fpe_arm_header) /* ARM FPE header address */
|
||||
_C_LABEL(fpe_arm_header):
|
||||
|
||||
/* FPE Core entry points */
|
||||
|
||||
#define E(n, o) \
|
||||
.global _C_LABEL(n) ; \
|
||||
_C_LABEL(n): b _C_LABEL(fpe_arm_start) + o
|
||||
|
||||
.global _fpe_arm_core_abort
|
||||
_fpe_arm_core_abort:
|
||||
b _fpe_arm_start + 0x00006cd4
|
||||
E(fpe_arm_core_abort, 0x00006cd4)
|
||||
|
||||
.global _fpe_arm_core_initws
|
||||
_fpe_arm_core_initws:
|
||||
b _fpe_arm_start + 0x00006e68
|
||||
E(fpe_arm_core_initws, 0x00006e68)
|
||||
|
||||
.global _fpe_arm_core_initcontext
|
||||
_fpe_arm_core_initcontext:
|
||||
b _fpe_arm_start + 0x00006ed0
|
||||
E(fpe_arm_core_initcontext, 0x00006ed0)
|
||||
|
||||
.global _fpe_arm_core_changecontext
|
||||
_fpe_arm_core_changecontext:
|
||||
b _fpe_arm_start + 0x00006f70
|
||||
E(fpe_arm_core_changecontext, 0x00006f70)
|
||||
|
||||
.global _fpe_arm_core_shutdown
|
||||
_fpe_arm_core_shutdown:
|
||||
b _fpe_arm_start + 0x00007080
|
||||
E(fpe_arm_core_shutdown, 0x00007080)
|
||||
|
||||
.global _fpe_arm_core_activatecontext
|
||||
_fpe_arm_core_activatecontext:
|
||||
b _fpe_arm_start + 0x00006fec
|
||||
E(fpe_arm_core_activatecontext, 0x00006fec)
|
||||
|
||||
.global _fpe_arm_core_deactivatecontext
|
||||
_fpe_arm_core_deactivatecontext:
|
||||
b _fpe_arm_start + 0x00006f78
|
||||
E(fpe_arm_core_deactivatecontext, 0x00006f78)
|
||||
|
||||
.global _fpe_arm_core_savecontext
|
||||
_fpe_arm_core_savecontext:
|
||||
b _fpe_arm_start + 0x00007154
|
||||
E(fpe_arm_core_savecontext, 0x00007154)
|
||||
|
||||
.global _fpe_arm_core_loadcontext
|
||||
_fpe_arm_core_loadcontext:
|
||||
b _fpe_arm_start + 0x00007240
|
||||
E(fpe_arm_core_loadcontext, 0x00007240)
|
||||
|
||||
.global _fpe_arm_core_disable
|
||||
_fpe_arm_core_disable:
|
||||
b _fpe_arm_start + 0x00007090
|
||||
E(fpe_arm_core_disable, 0x00007090)
|
||||
|
||||
.global _fpe_arm_core_enable
|
||||
_fpe_arm_core_enable:
|
||||
b _fpe_arm_start + 0x000070e4
|
||||
E(fpe_arm_core_enable, 0x000070e4)
|
||||
|
||||
#undef E
|
||||
|
||||
/* FPE Core callback points */
|
||||
|
||||
b _arm_fpe_newhandler
|
||||
b _arm_fpe_restorehandler
|
||||
b _arm_fpe_handle_exception
|
||||
b _arm_fpe_get_ws
|
||||
b _arm_fpe_post_proc
|
||||
b _C_LABEL(arm_fpe_newhandler)
|
||||
b _C_LABEL(arm_fpe_restorehandler)
|
||||
b _C_LABEL(arm_fpe_handle_exception)
|
||||
b _C_LABEL(arm_fpe_get_ws)
|
||||
b _C_LABEL(arm_fpe_post_proc)
|
||||
|
||||
/* FPE Core constants */
|
||||
|
||||
#define C(n, v) \
|
||||
.global _C_LABEL(n) ; \
|
||||
_C_LABEL(n): ; \
|
||||
.word v
|
||||
|
||||
.global _fpe_arm_workspace_length
|
||||
_fpe_arm_workspace_length:
|
||||
.word 0x0000000c
|
||||
C(fpe_arm_workspace_length, 0x0000000c)
|
||||
|
||||
.global _fpe_arm_context_length
|
||||
_fpe_arm_context_length:
|
||||
.word 0x00000088
|
||||
C(fpe_arm_context_length, 0x00000088)
|
||||
|
||||
.global _fpe_arm_identity
|
||||
_fpe_arm_identity:
|
||||
.word _fpe_arm_start + 0x0000732c
|
||||
C(fpe_arm_identity, _C_LABEL(fpe_arm_start) + 0x0000732c)
|
||||
|
||||
.global _fpe_arm_core
|
||||
_fpe_arm_core:
|
||||
.global _C_LABEL(fpe_arm_core)
|
||||
_C_LABEL(fpe_arm_core):
|
||||
.word 0x00000000
|
||||
.word 0x00000000
|
||||
.word 0x00000000
|
||||
|
@ -7516,5 +7500,5 @@ _fpe_arm_core:
|
|||
.word 0x000073a4
|
||||
.word 0xffffffff
|
||||
|
||||
.global _fpe_arm_end /* ARM FPE end address */
|
||||
_fpe_arm_end:
|
||||
.global _C_LABEL(fpe_arm_end) /* ARM FPE end address */
|
||||
_C_LABEL(fpe_arm_end):
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: armfpe_glue.S,v 1.1 2001/11/24 01:26:24 thorpej Exp $ */
|
||||
/* $NetBSD: armfpe_glue.S,v 1.2 2001/11/24 03:39:18 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Mark Brinicombe
|
||||
|
@ -51,18 +51,18 @@
|
|||
|
||||
ENTRY_NP(arm_fpe_core_disable)
|
||||
stmfd sp!, {r0-r7, lr}
|
||||
bl _fpe_arm_core_disable
|
||||
bl _C_LABEL(fpe_arm_core_disable)
|
||||
ldmfd sp!, {r0-r7, pc}
|
||||
|
||||
ENTRY_NP(arm_fpe_core_enable)
|
||||
stmfd sp!, {r0-r7, lr}
|
||||
bl _fpe_arm_core_enable
|
||||
bl _C_LABEL(fpe_arm_core_enable)
|
||||
ldmfd sp!, {r0-r7, pc}
|
||||
|
||||
ENTRY_NP(arm_fpe_core_initws)
|
||||
stmfd sp!, {r10, lr}
|
||||
mov r10, r0
|
||||
bl _fpe_arm_core_initws
|
||||
bl _C_LABEL(fpe_arm_core_initws)
|
||||
ldmfd sp!, {r10, pc}
|
||||
|
||||
ENTRY_NP(arm_fpe_core_abort)
|
||||
|
@ -70,7 +70,7 @@ ENTRY_NP(arm_fpe_core_abort)
|
|||
mov r10, r0
|
||||
mov r0, r1
|
||||
mov r1, r2
|
||||
bl _fpe_arm_core_abort
|
||||
bl _C_LABEL(fpe_arm_core_abort)
|
||||
ldmfd sp!, {r1-r7, r10, pc}
|
||||
|
||||
/* Only needs to preserve r10 */
|
||||
|
@ -78,7 +78,7 @@ ENTRY_NP(arm_fpe_core_abort)
|
|||
ENTRY_NP(arm_fpe_core_initcontext)
|
||||
stmfd sp!, {r0-r7, r10, lr}
|
||||
mov r10, r0
|
||||
bl _fpe_arm_core_initcontext
|
||||
bl _C_LABEL(fpe_arm_core_initcontext)
|
||||
ldmfd sp!, {r0-r7, r10, pc}
|
||||
|
||||
/* Only needs to preserve r10 */
|
||||
|
@ -86,14 +86,14 @@ ENTRY_NP(arm_fpe_core_initcontext)
|
|||
ENTRY_NP(arm_fpe_core_changecontext)
|
||||
stmfd sp!, {r1-r7, r10, lr}
|
||||
mov r10, r0
|
||||
bl _fpe_arm_core_changecontext
|
||||
bl _C_LABEL(fpe_arm_core_changecontext)
|
||||
ldmfd sp!, {r1-r7, r10, pc}
|
||||
|
||||
/* All regs preserved */
|
||||
|
||||
ENTRY_NP(arm_fpe_core_shutdown)
|
||||
stmfd sp!, {r0-r7, r10, lr}
|
||||
bl _fpe_arm_core_shutdown
|
||||
bl _C_LABEL(fpe_arm_core_shutdown)
|
||||
ldmfd sp!, {r0-r7, r10, pc}
|
||||
|
||||
/* Preserve r10 */
|
||||
|
@ -103,7 +103,7 @@ ENTRY_NP(arm_fpe_core_savecontext)
|
|||
mov r10, r0
|
||||
mov r0, r1
|
||||
mov r1, r2
|
||||
bl _fpe_arm_core_savecontext
|
||||
bl _C_LABEL(fpe_arm_core_savecontext)
|
||||
ldmfd sp!, {r1-r7, r10, pc}
|
||||
|
||||
/* Preserve r10 */
|
||||
|
@ -112,7 +112,7 @@ ENTRY_NP(arm_fpe_core_loadcontext)
|
|||
stmfd sp!, {r0-r7, r10, lr}
|
||||
mov r10, r0
|
||||
mov r0, r1
|
||||
bl _fpe_arm_core_loadcontext
|
||||
bl _C_LABEL(fpe_arm_core_loadcontext)
|
||||
ldmfd sp!, {r0-r7, r10, pc}
|
||||
|
||||
|
||||
|
@ -121,14 +121,14 @@ ENTRY_NP(arm_fpe_core_loadcontext)
|
|||
ENTRY_NP(arm_fpe_core_activatecontext)
|
||||
stmfd sp!, {r0-r7, r10, lr}
|
||||
mov r10, r0
|
||||
bl _fpe_arm_core_activatecontext
|
||||
bl _C_LABEL(fpe_arm_core_activatecontext)
|
||||
ldmfd sp!, {r0-r7, r10, pc}
|
||||
|
||||
/* Only needs to preserve r10 */
|
||||
|
||||
ENTRY_NP(arm_fpe_core_deactivatecontext)
|
||||
stmfd sp!, {r1-r7, r10, lr}
|
||||
bl _fpe_arm_core_deactivatecontext
|
||||
bl _C_LABEL(fpe_arm_core_deactivatecontext)
|
||||
ldmfd sp!, {r1-r7, r10, pc}
|
||||
|
||||
/*
|
||||
|
@ -142,7 +142,7 @@ ENTRY_NP(arm_fpe_newhandler)
|
|||
ldmfd sp!, {r0, pc}
|
||||
|
||||
Llocal_handler_addr:
|
||||
.word _undefined_handler_address
|
||||
.word _C_LABEL(undefined_handler_address)
|
||||
|
||||
ENTRY_NP(arm_fpe_restorehandler)
|
||||
stmfd sp!, {r0-r1, lr}
|
||||
|
@ -153,10 +153,10 @@ ENTRY_NP(arm_fpe_restorehandler)
|
|||
ldmfd sp!, {r0-r1, pc}
|
||||
|
||||
Lold_handler_addr:
|
||||
.word _arm_fpe_old_handler_address
|
||||
.word _C_LABEL(arm_fpe_old_handler_address)
|
||||
|
||||
ENTRY_NP(arm_fpe_handle_exception)
|
||||
b _arm_fpe_exception_glue
|
||||
b _C_LABEL(arm_fpe_exception_glue)
|
||||
|
||||
ENTRY_NP(arm_fpe_get_ws)
|
||||
sub sp, sp, #8
|
||||
|
@ -168,10 +168,10 @@ ENTRY_NP(arm_fpe_get_ws)
|
|||
mov pc, lr
|
||||
|
||||
Larm_fpe_core_workspace:
|
||||
.word _arm_fpe_core_workspace
|
||||
.word _C_LABEL(arm_fpe_core_workspace)
|
||||
|
||||
ENTRY_NP(arm_fpe_post_proc)
|
||||
b _arm_fpe_post_proc_glue
|
||||
b _C_LABEL(arm_fpe_post_proc_glue)
|
||||
|
||||
|
||||
/* Simple call back function that panics */
|
||||
|
@ -190,29 +190,29 @@ Lfpe_panic_text:
|
|||
|
||||
#ifdef CHECK_BEFORE_USERRET
|
||||
|
||||
.global _userret_count0
|
||||
.global _userret_count1
|
||||
.global _C_LABEL(userret_count0)
|
||||
.global _C_LABEL(userret_count1)
|
||||
.data
|
||||
_userret_count0:
|
||||
_C_LABEL(userret_count0):
|
||||
.word 0
|
||||
_userret_count1:
|
||||
_C_LABEL(userret_count1):
|
||||
.word 0
|
||||
|
||||
.text
|
||||
|
||||
Luserret_count0:
|
||||
.word _userret_count0
|
||||
.word _C_LABEL(userret_count0)
|
||||
Luserret_count1:
|
||||
.word _userret_count1
|
||||
.word _C_LABEL(userret_count1)
|
||||
|
||||
Lwant_resched:
|
||||
.word _want_resched
|
||||
.word _C_LABEL(want_resched)
|
||||
|
||||
Lcurproc:
|
||||
.word _curproc
|
||||
.word _C_LABEL(curproc)
|
||||
|
||||
Lcurpriority:
|
||||
.word _cpu_info_store
|
||||
.word _C_LABEL(cpu_info_store)
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -330,7 +330,7 @@ Lwe_need_userret:
|
|||
|
||||
/* More optimisation ... Need to code an assembly version of userret() */
|
||||
|
||||
bl _arm_fpe_postproc
|
||||
bl _C_LABEL(arm_fpe_postproc)
|
||||
|
||||
/* Release the trapframe on the SVC stack */
|
||||
mov r14, r5
|
||||
|
@ -417,7 +417,7 @@ ENTRY_NP(arm_fpe_exception_glue)
|
|||
|
||||
/* More optimisation ... Need to code an assembly version of userret() */
|
||||
|
||||
bl _arm_fpe_exception
|
||||
bl _C_LABEL(arm_fpe_exception)
|
||||
|
||||
/* Release the trapframe on the SVC stack */
|
||||
mov r14, r5
|
||||
|
@ -470,6 +470,6 @@ ENTRY_NP(arm_fpe_set_exception_mask)
|
|||
mov pc, lr /* return */
|
||||
|
||||
|
||||
.global _fpe_nexthandler
|
||||
_fpe_nexthandler:
|
||||
.word _undefinedinstruction_bounce
|
||||
.global _C_LABEL(fpe_nexthandler)
|
||||
_C_LABEL(fpe_nexthandler):
|
||||
.word _C_LABEL(undefinedinstruction_bounce)
|
||||
|
|
Loading…
Reference in New Issue