Fixes for building with GCC 4.9
This commit can be removed when updating to the latest Fiasco.OC version. Fixes ssumpf/foc#10
This commit is contained in:
committed by
Sebastian Sumpf
parent
1acdeeb381
commit
0644e90c5d
@@ -75,7 +75,8 @@ void Proc::stack_pointer(Mword sp)
|
|||||||
IMPLEMENT static inline
|
IMPLEMENT static inline
|
||||||
Mword Proc::program_counter()
|
Mword Proc::program_counter()
|
||||||
{
|
{
|
||||||
register Mword pc asm ("pc");
|
Mword pc;
|
||||||
|
asm ("mov %0, pc" : "=r" (pc));
|
||||||
return pc;
|
return pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ Sys_call_page::init()
|
|||||||
Vmem_alloc::NO_ZERO_FILL, Vmem_alloc::User))
|
Vmem_alloc::NO_ZERO_FILL, Vmem_alloc::User))
|
||||||
panic("FIASCO: can't allocate system-call page.\n");
|
panic("FIASCO: can't allocate system-call page.\n");
|
||||||
|
|
||||||
for (unsigned i = 0; i < Config::PAGE_SIZE; i += sizeof(Mword))
|
for (unsigned i = 0; i < Config::PAGE_SIZE / sizeof(Mword); i++)
|
||||||
*(sys_calls++) = 0xef000000; // svc
|
sys_calls[i] = 0xef000000; // svc
|
||||||
|
|
||||||
set_utcb_get_code((Mword*)(Mem_layout::Syscalls + 0xf00));
|
set_utcb_get_code((Mword*)(Mem_layout::Syscalls + 0xf00));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user