2 * linux/arch/arm/vfp/entry.S
4 * Copyright (C) 2004 ARM Limited.
5 * Written by Deep Blue Solutions Limited.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Basic entry code, called from the kernel's undefined instruction trap.
12 * r0 = faulted instruction
14 * r9 = successful return
15 * r10 = thread_info structure
18 #include <asm/thread_info.h>
19 #include <asm/vfpmacros.h>
20 #include "../kernel/entry-header.S"
24 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
25 add r11, r4, #1 @ increment it
26 str r11, [r10, #TI_PREEMPT]
29 str r2, [sp, #S_PC] @ update regs->ARM_pc for Thumb 2 case
31 ldr r11, [r10, #TI_CPU] @ CPU number
32 add r10, r10, #TI_VFPSTATE @ r10 = workspace
33 ldr pc, [r4] @ call VFP entry point
39 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
40 sub r11, r4, #1 @ decrement it
41 str r11, [r10, #TI_PREEMPT]
44 ENDPROC(vfp_null_entry)
50 @ This code is called if the VFP does not exist. It needs to flag the
51 @ failure to the VFP initialisation code.
54 ENTRY(vfp_testing_entry)
57 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
58 sub r11, r4, #1 @ decrement it
59 str r11, [r10, #TI_PREEMPT]
61 ldr r0, VFP_arch_address
62 str r5, [r0] @ known non-zero value
63 mov pc, r9 @ we have handled the fault
64 ENDPROC(vfp_testing_entry)