Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
92639b6b
Commit
92639b6b
authored
14 years ago
by
Austin Clements
Browse files
Options
Downloads
Patches
Plain Diff
Follow xv6 code style. Also fixes indexing for these functions
parent
37ee75f4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x86.h
+12
-6
12 additions, 6 deletions
x86.h
with
12 additions
and
6 deletions
x86.h
+
12
−
6
View file @
92639b6b
...
...
@@ -132,7 +132,8 @@ sti(void)
asm
volatile
(
"sti"
);
}
static
inline
void
nop_pause
(
void
)
static
inline
void
nop_pause
(
void
)
{
asm
volatile
(
"pause"
:
:
);
}
...
...
@@ -151,31 +152,36 @@ xchg(volatile uint *addr, uint newval)
return
result
;
}
static
inline
void
lcr0
(
uint
val
)
static
inline
void
lcr0
(
uint
val
)
{
asm
volatile
(
"movl %0,%%cr0"
:
:
"r"
(
val
));
}
static
inline
uint
rcr0
(
void
)
static
inline
uint
rcr0
(
void
)
{
uint
val
;
asm
volatile
(
"movl %%cr0,%0"
:
"=r"
(
val
));
return
val
;
}
static
inline
uint
rcr2
(
void
)
static
inline
uint
rcr2
(
void
)
{
uint
val
;
asm
volatile
(
"movl %%cr2,%0"
:
"=r"
(
val
));
return
val
;
}
static
inline
void
lcr3
(
uint
val
)
static
inline
void
lcr3
(
uint
val
)
{
asm
volatile
(
"movl %0,%%cr3"
:
:
"r"
(
val
));
}
static
inline
uint
rcr3
(
void
)
static
inline
uint
rcr3
(
void
)
{
uint
val
;
asm
volatile
(
"movl %%cr3,%0"
:
"=r"
(
val
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment