arch: fix x86_64 sp align, fix i686 missing f128 functions
This commit is contained in:
parent
7b9788188b
commit
ac7727b8b1
@ -526,6 +526,10 @@ impl<K: KernelTableManager, PA: PhysicalMemoryAllocator<Address = PhysicalAddres
|
|||||||
unsafe { (*self.inner.get()).fs_base = tp };
|
unsafe { (*self.inner.get()).fs_base = tp };
|
||||||
MSR_IA32_FS_BASE.set(tp as _);
|
MSR_IA32_FS_BASE.set(tp as _);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn align_stack_for_entry(sp: usize) -> usize {
|
||||||
|
(sp & !0xF) - 8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K: KernelTableManager, PA: PhysicalMemoryAllocator<Address = PhysicalAddress>> Drop
|
impl<K: KernelTableManager, PA: PhysicalMemoryAllocator<Address = PhysicalAddress>> Drop
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//! Yggdrasil OS application runtime
|
//! Yggdrasil OS application runtime
|
||||||
#![feature(rustc_private, decl_macro)]
|
#![feature(rustc_private, decl_macro, f128, linkage)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![allow(nonstandard_style)]
|
#![allow(nonstandard_style)]
|
||||||
|
@ -113,14 +113,10 @@ unsafe fn enter(entry: extern "C" fn(usize), argument: usize) -> ! {
|
|||||||
"#,
|
"#,
|
||||||
in(reg) argument,
|
in(reg) argument,
|
||||||
in(reg) entry,
|
in(reg) entry,
|
||||||
options(att_syntax)
|
options(att_syntax, noreturn)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#[cfg(any(target_arch = "x86_64", rust_analyzer))]
|
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64", rust_analyzer))]
|
||||||
{
|
|
||||||
loop {}
|
|
||||||
}
|
|
||||||
#[cfg(any(target_arch = "aarch64", rust_analyzer))]
|
|
||||||
{
|
{
|
||||||
entry(argument);
|
entry(argument);
|
||||||
unreachable!()
|
unreachable!()
|
||||||
|
@ -77,6 +77,7 @@ impl TlsLayoutBuilder for TlsLayoutImpl {
|
|||||||
segments,
|
segments,
|
||||||
total_size,
|
total_size,
|
||||||
tp_offset,
|
tp_offset,
|
||||||
|
prefix_len: 0
|
||||||
},
|
},
|
||||||
align,
|
align,
|
||||||
))
|
))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
|
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
|
||||||
"max-atomic-width": 64,
|
"max-atomic-width": 64,
|
||||||
"target-pointer-width": "32",
|
"target-pointer-width": "32",
|
||||||
"features": "+sse,-soft-float",
|
"features": "+sse",
|
||||||
|
|
||||||
"executables": true,
|
"executables": true,
|
||||||
"dynamic-linking": true,
|
"dynamic-linking": true,
|
||||||
|
@ -8,7 +8,7 @@ use std::{
|
|||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
env::{BuildEnv, Profile},
|
env::{Arch, BuildEnv, Profile},
|
||||||
error::Error,
|
error::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -87,11 +87,16 @@ impl<'e> CargoBuilder<'e> {
|
|||||||
.display(),
|
.display(),
|
||||||
env.arch
|
env.arch
|
||||||
);
|
);
|
||||||
|
let mut build_std_features =
|
||||||
|
"compiler-builtins-mangled-names,compiler-builtins-mem".to_owned();
|
||||||
|
if env.arch == Arch::i686 {
|
||||||
|
build_std_features += ",compiler-builtins-no-f16-f128";
|
||||||
|
}
|
||||||
|
|
||||||
command
|
command
|
||||||
.arg(arg)
|
.arg(arg)
|
||||||
.arg("-Zbuild-std=core,alloc")
|
.arg("-Zbuild-std=core,alloc")
|
||||||
.arg("-Zbuild-std-features=compiler-builtins-mangled-names,compiler-builtins-mem")
|
.arg(&format!("-Zbuild-std-features={build_std_features}"))
|
||||||
.arg(&format!("--target={target}"));
|
.arg(&format!("--target={target}"));
|
||||||
|
|
||||||
if env.verbose {
|
if env.verbose {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user