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
nexedi
linux
Commits
7d136361
Commit
7d136361
authored
May 27, 2003
by
Miles Bader
Committed by
Arnaldo Carvalho de Melo
May 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Whitespace and comment cleanups for v850 entry.S
parent
2813d4af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
49 deletions
+51
-49
arch/v850/kernel/entry.S
arch/v850/kernel/entry.S
+51
-49
No files found.
arch/v850/kernel/entry.S
View file @
7d136361
...
...
@@ -29,28 +29,28 @@
#define CSYM C_SYMBOL_NAME
/*
The
offset
of
the
struct
pt_regs
in
a
`
state
save
frame
'
on the stack. */
/*
The
offset
of
the
struct
pt_regs
in
a
state
-
save
-
frame
on
the
stack
.
*/
#define PTO STATE_SAVE_PT_OFFSET
/*
Save
argument
registers
to
the
st
ruct
pt_regs
pointed
to
by
EP
.
*/
/*
Save
argument
registers
to
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
*/
#define SAVE_ARG_REGS \
sst.w
r6
,
PTO
+
PT_GPR
(
6
)[
ep
]
; \
sst.w
r7
,
PTO
+
PT_GPR
(
7
)[
ep
]
; \
sst.w
r8
,
PTO
+
PT_GPR
(
8
)[
ep
]
; \
sst.w
r9
,
PTO
+
PT_GPR
(
9
)[
ep
]
/*
Restore
argument
registers
from
the
st
ruct
pt_regs
pointed
to
by
EP
.
*/
/*
Restore
argument
registers
from
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
*/
#define RESTORE_ARG_REGS \
sld.w
PTO
+
PT_GPR
(
6
)[
ep
],
r6
; \
sld.w
PTO
+
PT_GPR
(
7
)[
ep
],
r7
; \
sld.w
PTO
+
PT_GPR
(
8
)[
ep
],
r8
; \
sld.w
PTO
+
PT_GPR
(
9
)[
ep
],
r9
/*
Save
value
return
registers
to
the
st
ruct
pt_regs
pointed
to
by
EP
.
*/
/*
Save
value
return
registers
to
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
*/
#define SAVE_RVAL_REGS \
sst.w
r10
,
PTO
+
PT_GPR
(
10
)[
ep
]
; \
sst.w
r11
,
PTO
+
PT_GPR
(
11
)[
ep
]
/*
Restore
value
return
registers
from
the
st
ruct
pt_regs
pointed
to
by
EP
.
*/
/*
Restore
value
return
registers
from
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
*/
#define RESTORE_RVAL_REGS \
sld.w
PTO
+
PT_GPR
(
10
)[
ep
],
r10
; \
sld.w
PTO
+
PT_GPR
(
11
)[
ep
],
r11
...
...
@@ -81,13 +81,13 @@
sld.w
PTO
+
PT_GPR
(
18
)[
ep
],
r18
; \
sld.w
PTO
+
PT_GPR
(
19
)[
ep
],
r19
/*
Save
`
call
clobbered
' registers to the st
ruct pt_regs
pointed to by EP. */
/*
Save
`
call
clobbered
' registers to the st
ate-save-frame
pointed to by EP. */
#define SAVE_CALL_CLOBBERED_REGS \
SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS
; \
SAVE_ARG_REGS
; \
SAVE_RVAL_REGS
; \
SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL
/*
Restore
`
call
clobbered
' registers from the st
ruct pt_regs
pointed to
/*
Restore
`
call
clobbered
' registers from the st
ate-save-frame
pointed to
by
EP
.
*/
#define RESTORE_CALL_CLOBBERED_REGS \
RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS
; \
...
...
@@ -96,19 +96,19 @@
RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL
/*
Save
`
call
clobbered
' registers except for the return-value registers
to
the
st
ruct
pt_regs
pointed
to
by
EP
.
*/
to
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
*/
#define SAVE_CALL_CLOBBERED_REGS_NO_RVAL \
SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS
; \
SAVE_ARG_REGS
; \
SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL
/*
Restore
`
call
clobbered
' registers except for the return-value registers
from
the
st
ruct
pt_regs
pointed
to
by
EP
.
*/
from
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
*/
#define RESTORE_CALL_CLOBBERED_REGS_NO_RVAL \
RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS
; \
RESTORE_ARG_REGS
; \
RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL
/*
Save
`
call
saved
' registers to the st
ruct pt_regs
pointed to by EP. */
/*
Save
`
call
saved
' registers to the st
ate-save-frame
pointed to by EP. */
#define SAVE_CALL_SAVED_REGS \
sst.w
r2
,
PTO
+
PT_GPR
(
2
)[
ep
]
; \
sst.w
r20
,
PTO
+
PT_GPR
(
20
)[
ep
]
; \
...
...
@@ -121,7 +121,7 @@
sst.w
r27
,
PTO
+
PT_GPR
(
27
)[
ep
]
; \
sst.w
r28
,
PTO
+
PT_GPR
(
28
)[
ep
]
; \
sst.w
r29
,
PTO
+
PT_GPR
(
29
)[
ep
]
/*
Restore
`
call
saved
' registers from the st
ruct pt_regs
pointed to by EP. */
/*
Restore
`
call
saved
' registers from the st
ate-save-frame
pointed to by EP. */
#define RESTORE_CALL_SAVED_REGS \
sld.w
PTO
+
PT_GPR
(
2
)[
ep
],
r2
; \
sld.w
PTO
+
PT_GPR
(
20
)[
ep
],
r20
; \
...
...
@@ -136,12 +136,12 @@
sld.w
PTO
+
PT_GPR
(
29
)[
ep
],
r29
/*
Save
the
PC
stored
in
the
special
register
SAVEREG
to
the
st
ruct
pt_regs
/*
Save
the
PC
stored
in
the
special
register
SAVEREG
to
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
r19
is
clobbered
.
*/
#define SAVE_PC(savereg) \
stsr
SR_
##
savereg
,
r19
; \
sst.w
r19
,
PTO
+
PT_PC
[
ep
]
/*
Restore
the
PC
from
the
st
ruct
pt_regs
pointed
to
by
EP
,
to
the
special
/*
Restore
the
PC
from
the
st
ate
-
save
-
frame
pointed
to
by
EP
,
to
the
special
register
SAVEREG
.
LP
is
clobbered
(
it
is
used
as
a
scratch
register
because
the
POP_STATE
macro
restores
it
,
and
this
macro
is
usually
used
inside
POP_STATE
)
.
*/
...
...
@@ -149,11 +149,11 @@
sld.w
PTO
+
PT_PC
[
ep
],
lp
; \
ldsr
lp
,
SR_
##
savereg
/*
Save
the
PSW
register
stored
in
the
special
register
SAVREG
to
the
st
ruct
pt_regs
pointed
to
by
EP
r19
is
clobbered
.
*/
st
ate
-
save
-
frame
pointed
to
by
EP
.
r19
is
clobbered
.
*/
#define SAVE_PSW(savereg) \
stsr
SR_
##
savereg
,
r19
; \
sst.w
r19
,
PTO
+
PT_PSW
[
ep
]
/*
Restore
the
PSW
register
from
the
st
ruct
pt_regs
pointed
to
by
EP
,
to
/*
Restore
the
PSW
register
from
the
st
ate
-
save
-
frame
pointed
to
by
EP
,
to
the
special
register
SAVEREG
.
LP
is
clobbered
(
it
is
used
as
a
scratch
register
because
the
POP_STATE
macro
restores
it
,
and
this
macro
is
usually
used
inside
POP_STATE
)
.
*/
...
...
@@ -161,7 +161,7 @@
sld.w
PTO
+
PT_PSW
[
ep
],
lp
; \
ldsr
lp
,
SR_
##
savereg
/*
Save
CTPC
/
CTPSW
/
CTBP
registers
to
the
st
ruct
pt_regs
pointed
to
by
REG
.
/*
Save
CTPC
/
CTPSW
/
CTBP
registers
to
the
st
ate
-
save
-
frame
pointed
to
by
REG
.
r19
is
clobbered
.
*/
#define SAVE_CT_REGS \
stsr
SR_CTPC
,
r19
; \
...
...
@@ -170,7 +170,7 @@
sst.w
r19
,
PTO
+
PT_CTPSW
[
ep
]
; \
stsr
SR_CTBP
,
r19
; \
sst.w
r19
,
PTO
+
PT_CTBP
[
ep
]
/*
Restore
CTPC
/
CTPSW
/
CTBP
registers
from
the
st
ruct
pt_regs
pointed
to
by
EP
.
/*
Restore
CTPC
/
CTPSW
/
CTBP
registers
from
the
st
ate
-
save
-
frame
pointed
to
by
EP
.
LP
is
clobbered
(
it
is
used
as
a
scratch
register
because
the
POP_STATE
macro
restores
it
,
and
this
macro
is
usually
used
inside
POP_STATE
)
.
*/
#define RESTORE_CT_REGS \
...
...
@@ -182,10 +182,11 @@
ldsr
lp
,
SR_CTBP
/*
Push
register
state
,
except
for
the
stack
pointer
,
on
the
stack
in
the
form
of
a
struct
pt_regs
,
in
preparation
for
a
system
call
.
This
macro
makes
sure
that
`
special
' registers, system registers; TYPE identifies the set of
extra
registers
to
be
saved
as
well
.
EP
is
clobbered
.
*/
/*
Push
register
state
,
except
for
the
stack
pointer
,
on
the
stack
in
the
form
of
a
state
-
save
-
frame
(
plus
some
extra
padding
),
in
preparation
for
a
system
call
.
This
macro
makes
sure
that
the
EP
,
GP
,
and
LP
registers
are
saved
,
and
TYPE
identifies
the
set
of
extra
registers
to
be
saved
as
well
.
Also
copies
(
the
new
value
of
)
SP
to
EP
.
*/
#define PUSH_STATE(type) \
addi
-
STATE_SAVE_SIZE
,
sp
,
sp
; /* Make room on the stack. */ \
st.w
ep
,
PTO
+
PT_GPR
(
GPR_EP
)[
sp
]
; \
...
...
@@ -193,8 +194,8 @@
sst.w
gp
,
PTO
+
PT_GPR
(
GPR_GP
)[
ep
]
; \
sst.w
lp
,
PTO
+
PT_GPR
(
GPR_LP
)[
ep
]
; \
type
##
_STATE_SAVER
/*
Pop
a
register
state
,
except
for
the
stack
pointer
,
from
the
struct
pt_regs
on
the
stack
.
*/
/*
Pop
a
register
state
pushed
by
PUSH_STATE
,
except
for
the
stack
pointer
,
from
the
the
stack
.
*/
#define POP_STATE(type) \
mov
sp
,
ep
; \
type
##
_STATE_RESTORER
; \
...
...
@@ -205,7 +206,7 @@
/*
Switch
to
the
kernel
stack
if
necessary
,
and
push
register
state
on
the
stack
in
the
form
of
a
st
ruct
pt_regs
.
Also
load
the
current
task
stack
in
the
form
of
a
st
ate
-
save
-
frame
.
Also
load
the
current
task
pointer
if
switching
from
user
mode
.
The
stack
-
pointer
(
r3
)
should
have
already
been
saved
to
the
memory
location
SP_SAVE_LOC
(
the
reason
for
this
is
that
the
interrupt
vectors
may
be
beyond
a
22
-
bit
signed
offset
...
...
@@ -311,8 +312,8 @@
#define IRQ_EXTRA_STATE_RESTORER \
RESTORE_CALL_SAVED_REGS
; \
RESTORE_CT_REGS
#define IRQ_
FUNCALL_EXTRA_STATE_SAVER
/* nothing */
#define IRQ_
FUNCALL
_EXTRA_STATE_RESTORER /* nothing */
#define IRQ_
SCHEDULE_EXTRA_STATE_SAVER
/* nothing */
#define IRQ_
SCHEDULE
_EXTRA_STATE_RESTORER /* nothing */
/*
Register
saving
/
restoring
for
non
-
maskable
interrupts
.
*/
#define NMI_RET reti
...
...
@@ -330,8 +331,8 @@
#define NMI_EXTRA_STATE_RESTORER \
RESTORE_CALL_SAVED_REGS
; \
RESTORE_CT_REGS
#define NMI_
FUNCALL_EXTRA_STATE_SAVER
/* nothing */
#define NMI_
FUNCALL
_EXTRA_STATE_RESTORER /* nothing */
#define NMI_
SCHEDULE_EXTRA_STATE_SAVER
/* nothing */
#define NMI_
SCHEDULE
_EXTRA_STATE_RESTORER /* nothing */
/*
Register
saving
/
restoring
for
debug
traps
.
*/
#define DBTRAP_RET .long 0x014607E0 /* `dbret', but gas doesn't support it. */
...
...
@@ -349,8 +350,8 @@
#define DBTRAP_EXTRA_STATE_RESTORER \
RESTORE_CALL_SAVED_REGS
; \
RESTORE_CT_REGS
#define DBTRAP_
FUNCALL_EXTRA_STATE_SAVER
/* nothing */
#define DBTRAP_
FUNCALL_EXTRA_STATE_RESTORER
/* nothing */
#define DBTRAP_
SCHEDULE_EXTRA_STATE_SAVER
/* nothing */
#define DBTRAP_
SCHEDULE_EXTRA_STATE_RESTORER
/* nothing */
/*
Register
saving
/
restoring
for
a
context
switch
.
We
don
't need to save
too
many
registers
,
because
context
-
switching
looks
like
a
function
call
...
...
@@ -372,7 +373,7 @@
RESTORE_CT_REGS
/*
Restore
register
state
from
the
st
ruct
pt_regs
on
the
stack
,
switch
back
/*
Restore
register
state
from
the
st
ate
-
save
-
frame
on
the
stack
,
switch
back
to
the
user
stack
if
necessary
,
and
return
from
the
trap
/
interrupt
.
EXTRA_STATE_RESTORER
is
a
sequence
of
assembly
language
statements
to
restore
anything
not
restored
by
this
macro
.
Only
registers
not
saved
by
...
...
@@ -505,6 +506,7 @@ L_ENTRY(ret_from_trap):
RETURN
(
TRAP
)
END
(
ret_from_trap
)
/*
This
the
initial
entry
point
for
a
new
child
thread
,
with
an
appropriate
stack
in
place
that
makes
it
look
the
the
child
is
in
the
middle
of
an
syscall
.
This
function
is
actually
`
returned
to
' from switch_thread
...
...
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