toolchain_update
Yuhao Zhou 6 years ago
commit e5eeccffaf

@ -295,7 +295,7 @@ else ifeq ($(arch), aarch64)
else ifeq ($(arch), mipsel)
# qemu-system-mipsel accepts ELF file only, so don't use objcopy
@cp $(kernel) $(kernel)_orig
@$(strip) $(kernel) -o $(kernel)
@$(strip) $(kernel) -o $@
endif
kernel: $(dtb)

@ -157,12 +157,12 @@ impl Context {
/// Store current sp, switch to target.
/// Pop all callee-saved registers, then return to the target.
#[inline(always)]
pub unsafe extern fn switch(&mut self, _target: &mut Self) {
extern {
fn switch_context(src : &mut Context, dst : &mut Context);
pub unsafe fn switch(&mut self, target: &mut Self) {
extern "C" {
fn switch_context(src: *mut Context, dst: *mut Context);
}
switch_context(self, _target);
switch_context(self as *mut Context, target as *mut Context);
}
/// Constructs a null Context for the current running thread.

@ -24,8 +24,8 @@ pub fn fp() -> usize {
}
#[cfg(any(target_arch = "mips"))]
unsafe {
// fp = s8 = $30
asm!("ori $0, $$$1, 0" : "=r"(ptr): "i"(30));
// fp = $30
asm!("ori $0, $$30, 0" : "=r"(ptr));
}
ptr
@ -51,7 +51,7 @@ pub fn lr() -> usize {
#[cfg(target_arch = "mips")]
unsafe {
asm!("ori $0, $$$1, 0" : "=r"(ptr) : "i"(31));
asm!("ori $0, $$31, 0" : "=r"(ptr));
}
ptr

Loading…
Cancel
Save