Commit 2c000b16 authored by Catalin Marinas's avatar Catalin Marinas

Thumb-2: Implement the unified VFP support

This patch modifies the VFP files for the ARM/Thumb-2 unified
assembler syntax.
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 34406666
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
* r10 = thread_info structure * r10 = thread_info structure
* lr = failure return * lr = failure return
*/ */
#include <asm/unified.h>
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
...@@ -22,6 +24,7 @@ ...@@ -22,6 +24,7 @@
#include <asm/vfpmacros.h> #include <asm/vfpmacros.h>
.globl do_vfp .globl do_vfp
.type do_vfp, %function
do_vfp: do_vfp:
enable_irq enable_irq
ldr r4, .LCvfp ldr r4, .LCvfp
...@@ -37,6 +40,7 @@ do_vfp: ...@@ -37,6 +40,7 @@ do_vfp:
__INIT __INIT
.globl vfp_testing_entry .globl vfp_testing_entry
.type vfp_testing_entry, %function
vfp_testing_entry: vfp_testing_entry:
ldr r0, VFP_arch_address ldr r0, VFP_arch_address
str r5, [r0] @ known non-zero value str r5, [r0] @ known non-zero value
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <asm/unified.h>
static inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift) static inline u32 vfp_shiftright32jamming(u32 val, unsigned int shift)
{ {
...@@ -37,6 +38,7 @@ static inline u32 vfp_hi64to32jamming(u64 val) ...@@ -37,6 +38,7 @@ static inline u32 vfp_hi64to32jamming(u64 val)
asm( asm(
"cmp %Q1, #1 @ vfp_hi64to32jamming\n\t" "cmp %Q1, #1 @ vfp_hi64to32jamming\n\t"
"ite cc\n\t"
"movcc %0, %R1\n\t" "movcc %0, %R1\n\t"
"orrcs %0, %R1, #1" "orrcs %0, %R1, #1"
: "=r" (v) : "r" (val) : "cc"); : "=r" (v) : "r" (val) : "cc");
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
* r10 points at the start of the private FP workspace in the thread structure * r10 points at the start of the private FP workspace in the thread structure
* sp points to a struct pt_regs (as defined in include/asm/proc/ptrace.h) * sp points to a struct pt_regs (as defined in include/asm/proc/ptrace.h)
*/ */
#include <asm/unified.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/vfpmacros.h> #include <asm/vfpmacros.h>
#include "../kernel/entry-header.S" #include "../kernel/entry-header.S"
...@@ -69,6 +71,7 @@ ...@@ -69,6 +71,7 @@
@ lr = failure return @ lr = failure return
.globl vfp_support_entry .globl vfp_support_entry
.type vfp_support_entry, %function
vfp_support_entry: vfp_support_entry:
DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10 DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10
...@@ -194,6 +197,7 @@ last_VFP_context_address: ...@@ -194,6 +197,7 @@ last_VFP_context_address:
.word last_VFP_context .word last_VFP_context
.globl vfp_get_float .globl vfp_get_float
.type vfp_get_float, %function
vfp_get_float: vfp_get_float:
add pc, pc, r0, lsl #3 add pc, pc, r0, lsl #3
mov r0, r0 mov r0, r0
...@@ -205,6 +209,7 @@ vfp_get_float: ...@@ -205,6 +209,7 @@ vfp_get_float:
.endr .endr
.globl vfp_put_float .globl vfp_put_float
.type vfp_put_float, %function
vfp_put_float: vfp_put_float:
add pc, pc, r1, lsl #3 add pc, pc, r1, lsl #3
mov r0, r0 mov r0, r0
...@@ -216,6 +221,7 @@ vfp_put_float: ...@@ -216,6 +221,7 @@ vfp_put_float:
.endr .endr
.globl vfp_get_double .globl vfp_get_double
.type vfp_get_double, %function
vfp_get_double: vfp_get_double:
add pc, pc, r0, lsl #3 add pc, pc, r0, lsl #3
mov r0, r0 mov r0, r0
...@@ -237,6 +243,7 @@ vfp_get_double: ...@@ -237,6 +243,7 @@ vfp_get_double:
mov pc, lr mov pc, lr
.globl vfp_put_double .globl vfp_put_double
.type vfp_put_double, %function
vfp_put_double: vfp_put_double:
add pc, pc, r2, lsl #3 add pc, pc, r2, lsl #3
mov r0, r0 mov r0, r0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment