merged in removing-assembly branch to do more in C

git-svn-id: svn://anubis/hos/trunk@80 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
josh committed 2010-01-07 15:38:15 +00:00
1 parent 76ac4f88a4
commit e4701b8d96
10 files changed
+104 -147

No files matched your search

+5 -2
View File
@@ -4,6 +4,7 @@
#include "hos_types.h"
static u32_t read_cr0() __attribute__ ((unused));
static u32_t read_cr0()
{
u32_t val;
@@ -11,6 +12,7 @@ static u32_t read_cr0()
return val;
}
static u32_t read_cr2() __attribute__ ((unused));
static u32_t read_cr2()
{
u32_t val;
@@ -18,6 +20,7 @@ static u32_t read_cr2()
return val;
}
static u32_t read_cr3() __attribute__ ((unused));
static u32_t read_cr3()
{
u32_t val;
@@ -25,10 +28,10 @@ static u32_t read_cr3()
return val;
}
#define set_cr0(val) \
#define write_cr0(val) \
__asm__ __volatile__ ("movl %0, %%cr0" : : "r" (val));
#define set_cr3(val) \
#define write_cr3(val) \
__asm__ __volatile__ ("movl %0, %%cr3" : : "r" (val));
#endif