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 };
|
||||
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
|
||||
|
@ -1,5 +1,5 @@
|
||||
//! Yggdrasil OS application runtime
|
||||
#![feature(rustc_private, decl_macro)]
|
||||
#![feature(rustc_private, decl_macro, f128, linkage)]
|
||||
#![no_std]
|
||||
#![deny(missing_docs)]
|
||||
#![allow(nonstandard_style)]
|
||||
|
@ -113,14 +113,10 @@ unsafe fn enter(entry: extern "C" fn(usize), argument: usize) -> ! {
|
||||
"#,
|
||||
in(reg) argument,
|
||||
in(reg) entry,
|
||||
options(att_syntax)
|
||||
options(att_syntax, noreturn)
|
||||
);
|
||||
}
|
||||
#[cfg(any(target_arch = "x86_64", rust_analyzer))]
|
||||
{
|
||||
loop {}
|
||||
}
|
||||
#[cfg(any(target_arch = "aarch64", rust_analyzer))]
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "x86_64", rust_analyzer))]
|
||||
{
|
||||
entry(argument);
|
||||
unreachable!()
|
||||
|
@ -77,6 +77,7 @@ impl TlsLayoutBuilder for TlsLayoutImpl {
|
||||
segments,
|
||||
total_size,
|
||||
tp_offset,
|
||||
prefix_len: 0
|
||||
},
|
||||
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",
|
||||
"max-atomic-width": 64,
|
||||
"target-pointer-width": "32",
|
||||
"features": "+sse,-soft-float",
|
||||
"features": "+sse",
|
||||
|
||||
"executables": true,
|
||||
"dynamic-linking": true,
|
||||
|
@ -8,7 +8,7 @@ use std::{
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{
|
||||
env::{BuildEnv, Profile},
|
||||
env::{Arch, BuildEnv, Profile},
|
||||
error::Error,
|
||||
};
|
||||
|
||||
@ -87,11 +87,16 @@ impl<'e> CargoBuilder<'e> {
|
||||
.display(),
|
||||
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
|
||||
.arg(arg)
|
||||
.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}"));
|
||||
|
||||
if env.verbose {
|
||||
|
Loading…
x
Reference in New Issue
Block a user