Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a382f0c3
Commit
a382f0c3
authored
Sep 29, 2002
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Unify integer register usage passed into FP module.
This allows the FP module to perform some extra optimisations.
parent
3a8fb256
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
11 deletions
+53
-11
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-armv.S
+53
-11
No files found.
arch/arm/kernel/entry-armv.S
View file @
a382f0c3
...
@@ -657,7 +657,7 @@ __und_invalid: sub sp, sp, #S_FRAME_SIZE
...
@@ -657,7 +657,7 @@ __und_invalid: sub sp, sp, #S_FRAME_SIZE
#if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE
#if defined CONFIG_FPE_NWFPE || defined CONFIG_FPE_FASTFPE
/
*
The
FPE
is
always
present
*/
/
*
The
FPE
is
always
present
*/
.
equ
fpe_not_present
,
0
.
equ
fpe_not_present
,
fpundefinstr
#else
#else
wfs_mask_data
:
.
word
0x0e200110
@
WFS
/
RFS
wfs_mask_data
:
.
word
0x0e200110
@
WFS
/
RFS
.
word
0x0fef0fff
.
word
0x0fef0fff
...
@@ -788,15 +788,16 @@ svc_preempt: teq r9, #0 @ was preempt count = 0
...
@@ -788,15 +788,16 @@ svc_preempt: teq r9, #0 @ was preempt count = 0
.
align
5
.
align
5
__und_svc
:
sub
sp
,
sp
,
#
S_FRAME_SIZE
__und_svc
:
sub
sp
,
sp
,
#
S_FRAME_SIZE
stmia
sp
,
{
r0
-
r12
}
@
save
r0
-
r12
stmia
sp
,
{
r0
-
r12
}
@
save
r0
-
r12
ldr
r
7
,
.
LCund
ldr
r
3
,
.
LCund
mov
r
6
,
lr
mov
r
4
,
lr
ldmia
r
7
,
{
r7
-
r9
}
ldmia
r
3
,
{
r5
-
r7
}
add
r
5
,
sp
,
#
S_FRAME_SIZE
add
r
3
,
sp
,
#
S_FRAME_SIZE
add
r
4
,
sp
,
#
S_SP
add
r
2
,
sp
,
#
S_SP
stmia
r
4
,
{
r5
-
r9
}
@
save
sp_SVC
,
lr_SVC
,
pc
,
cpsr
,
old_ro
stmia
r
2
,
{
r3
-
r7
}
@
save
sp_SVC
,
lr_SVC
,
pc
,
cpsr
,
old_ro
adrsvc
al
,
r9
,
1
f
@
r9
=
normal
FP
return
ldr
r0
,
[
r5
,
#-
4
]
@
r0
=
instruction
bl
call_fpe
@
lr
=
undefined
instr
return
adrsvc
al
,
r9
,
1
f
@
r9
=
normal
FP
return
bl
call_fpe
@
lr
=
undefined
instr
return
mov
r0
,
sp
@
struct
pt_regs
*
regs
mov
r0
,
sp
@
struct
pt_regs
*
regs
bl
do_undefinstr
bl
do_undefinstr
...
@@ -913,17 +914,58 @@ __und_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go
...
@@ -913,17 +914,58 @@ __und_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go
zero_fp
zero_fp
tst
r6
,
#
PSR_T_BIT
@
Thumb
mode
?
tst
r6
,
#
PSR_T_BIT
@
Thumb
mode
?
bne
fpundefinstr
@
ignore
FP
bne
fpundefinstr
@
ignore
FP
sub
r4
,
r5
,
#
4
1
:
ldrt
r0
,
[
r4
]
@
r0
=
instruction
adrsvc
al
,
r9
,
ret_from_exception
@
r9
=
normal
FP
return
adrsvc
al
,
r9
,
ret_from_exception
@
r9
=
normal
FP
return
adrsvc
al
,
lr
,
fpundefinstr
@
lr
=
undefined
instr
return
adrsvc
al
,
lr
,
fpundefinstr
@
lr
=
undefined
instr
return
call_fpe
:
enable_irq
r0
@
Enable
interrupts
/*
get_thread_info
r10
@
get
current
thread
*
The
out
of
line
fixup
for
the
ldrt
above
.
*/
.
section
.
fixup
,
"ax"
2
:
mov
pc
,
r9
.
previous
.
section
__ex_table
,
"a"
.
long
1
b
,
2
b
.
previous
/*
*
r0
=
instruction
.
*
*
Check
whether
the
instruction
is
a
co
-
processor
instruction
.
*
If
yes
,
we
need
to
call
the
relevant
co
-
processor
handler
.
*
*
Note
that
we
don
't do a full check here for the co-processor
*
instructions
; all instructions with bit 27 set are well
*
defined
.
The
only
instructions
that
should
fault
are
the
*
co
-
processor
instructions
.
However
,
we
have
to
watch
out
*
for
the
ARM6
/
ARM7
SWI
bug
.
*
*
Emulators
may
wish
to
make
use
of
the
instruction
value
we
*
prepared
for
them
in
r0
.
*/
call_fpe
:
enable_irq
r10
@
Enable
interrupts
tst
r0
,
#
0x08000000
@
only
CDP
/
CPRT
/
LDC
/
STC
have
bit
27
#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710)
and
r10
,
r0
,
#
0x0f000000
@
mask
out
op
-
code
bits
teqne
r10
,
#
0x0f000000
@
SWI
(
ARM6
/
7
bug
)?
#endif
moveq
pc
,
lr
do_fpe
:
get_thread_info
r10
@
get
current
thread
ldr
r4
,
[
r10
,
#
TI_TASK
]
@
get
current
task
ldr
r4
,
[
r10
,
#
TI_TASK
]
@
get
current
task
mov
r8
,
#
1
mov
r8
,
#
1
strb
r8
,
[
r4
,
#
TSK_USED_MATH
]
@
set
current
->
used_math
strb
r8
,
[
r4
,
#
TSK_USED_MATH
]
@
set
current
->
used_math
ldr
r4
,
.
LCfp
ldr
r4
,
.
LCfp
add
r10
,
r10
,
#
TI_FPSTATE
@
r10
=
workspace
add
r10
,
r10
,
#
TI_FPSTATE
@
r10
=
workspace
ldr
pc
,
[
r4
]
@
Call
FP
module
USR
entry
point
ldr
pc
,
[
r4
]
@
Call
FP
module
USR
entry
point
/*
*
The
FP
module
is
called
with
these
registers
set
:
*
r0
=
instruction
*
r5
=
PC
*
r9
=
normal
"successful"
return
address
*
r10
=
FP
workspace
*
lr
=
unrecognised
FP
instruction
return
address
*/
fpundefinstr
:
mov
r0
,
sp
fpundefinstr
:
mov
r0
,
sp
adrsvc
al
,
lr
,
ret_from_exception
adrsvc
al
,
lr
,
ret_from_exception
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment