提交 80be36d8 编写于 作者: B bernard.xiong

fix some embedded assemble issues.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@212 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 dbade245
......@@ -23,7 +23,7 @@
#define ICACHE_MASK (rt_uint32_t)(1 << 12)
#define DCACHE_MASK (rt_uint32_t)(1 << 2)
#ifdef __GNU_C__
#ifdef __GNUC__
rt_inline rt_uint32_t cp15_rd(void)
{
rt_uint32_t i;
......
......@@ -41,7 +41,7 @@
#define RW_NCNB (AP_RW|DOMAIN0|NCNB|DESC_SEC)
#define RW_FAULT (AP_RW|DOMAIN1|NCNB|DESC_SEC)
#ifdef __GNU_C__
#ifdef __GNUC__
void mmu_setttbase(register rt_uint32_t i)
{
asm ("mcr p15, 0, %0, c2, c2, 0": :"r" (i));
......@@ -200,35 +200,35 @@ __asm void mmu_disable()
__asm void mmu_enable_icache()
{
mrc p15, 0, r0, c1, c0, 0
orr r0, r0, #0x100
orr r0, r0, #0x1000
mcr p15, 0, r0, c1, c0, 0
}
__asm void mmu_enable_dcache()
{
mrc p15, 0, r0, c1, c0, 0
orr r0, r0, #0x02
orr r0, r0, #0x04
mcr p15, 0, r0, c1, c0, 0
}
__asm void mmu_disable_icache()
{
mrc p15, 0, r0, c1, c0, 0
bic r0, r0, #0x100
bic r0, r0, #0x1000
mcr p15, 0, r0, c1, c0, 0
}
__asm void mmu_disable_dcache()
{
mrc p15, 0, r0, c1, c0, 0
bic r0, r0, #0x100
bic r0, r0, #0x04
mcr p15, 0, r0, c1, c0, 0
}
__asm void mmu_enable_alignfault()
{
mrc p15, 0, r0, c1, c0, 0
bic r0, r0, #0x01
orr r0, r0, #0x02
mcr p15, 0, r0, c1, c0, 0
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册