Skip to content

Commit faeede3

Browse files
committed
Merge branch 'sync_from_rust'
2 parents ab7777f + 02b0f3b commit faeede3

27 files changed

Lines changed: 80 additions & 99 deletions

‎build_system/abi_cafe.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
usecrate::path::{Dirs,RelPath};
22
usecrate::prepare::GitRepo;
3-
usecrate::utils::{spawn_and_wait,CargoProject,Compiler};
4-
usecrate::{build_sysroot,CodegenBackend,SysrootKind};
3+
usecrate::utils::{CargoProject,Compiler, spawn_and_wait};
4+
usecrate::{CodegenBackend,SysrootKind, build_sysroot};
55

66
staticABI_CAFE_REPO:GitRepo = GitRepo::github(
77
"Gankra",

‎build_system/bench.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::process::Command;
66
usecrate::path::{Dirs,RelPath};
77
usecrate::prepare::GitRepo;
88
usecrate::rustc_info::get_file_name;
9-
usecrate::utils::{spawn_and_wait,Compiler};
9+
usecrate::utils::{Compiler, spawn_and_wait};
1010

1111
staticSIMPLE_RAYTRACER_REPO:GitRepo = GitRepo::github(
1212
"ebobby",

‎build_system/build_sysroot.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use crate::path::{Dirs, RelPath};
66
usecrate::prepare::apply_patches;
77
usecrate::rustc_info::{get_default_sysroot, get_file_name};
88
usecrate::utils::{
9-
ensure_empty_dir, spawn_and_wait, try_hard_link,CargoProject,Compiler,LogGroup,
9+
CargoProject,Compiler,LogGroup, ensure_empty_dir, spawn_and_wait, try_hard_link,
1010
};
11-
usecrate::{config,CodegenBackend,SysrootKind};
11+
usecrate::{CodegenBackend,SysrootKind, config};
1212

1313
pub(crate)fnbuild_sysroot(
1414
dirs:&Dirs,

‎build_system/tests.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ use std::path::PathBuf;
44
use std::process::Command;
55

66
usecrate::path::{Dirs,RelPath};
7-
usecrate::prepare::{apply_patches,GitRepo};
7+
usecrate::prepare::{GitRepo, apply_patches};
88
usecrate::rustc_info::get_default_sysroot;
99
usecrate::shared_utils::rustflags_from_env;
10-
usecrate::utils::{spawn_and_wait,CargoProject,Compiler,LogGroup};
11-
usecrate::{build_sysroot, config,CodegenBackend,SysrootKind};
10+
usecrate::utils::{CargoProject,Compiler,LogGroup, spawn_and_wait};
11+
usecrate::{CodegenBackend,SysrootKind, build_sysroot, config};
1212

1313
staticBUILD_EXAMPLE_OUT_DIR:RelPath = RelPath::BUILD.join("example");
1414

‎example/std_example.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,9 @@ unsafe fn test_simd() {
238238
let(zero0, zero1) = std::mem::transmute::<_,(u64,u64)>(x);
239239
assert_eq!((zero0, zero1),(0,0));
240240
assert_eq!(std::mem::transmute::<_,[u16;8]>(or),[7,7,7,7,7,7,7,7]);
241-
assert_eq!(
242-
std::mem::transmute::<_,[u16;8]>(cmp_eq),
243-
[0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff]
244-
);
241+
assert_eq!(std::mem::transmute::<_,[u16;8]>(cmp_eq),[
242+
0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff
243+
]);
245244
assert_eq!(std::mem::transmute::<_,[u16;8]>(cmp_lt),[0,0,0,0,0,0,0,0]);
246245

247246
test_mm_slli_si128();

‎src/abi/mod.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use cranelift_module::ModuleError;
1313
use rustc_codegen_ssa::base::is_call_from_compiler_builtins_to_upstream_monomorphization;
1414
use rustc_codegen_ssa::errors::CompilerBuiltinsCannotCall;
1515
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
16+
use rustc_middle::ty::TypeVisitableExt;
1617
use rustc_middle::ty::layout::FnAbiOf;
1718
use rustc_middle::ty::print::with_no_trimmed_paths;
18-
use rustc_middle::ty::TypeVisitableExt;
1919
use rustc_session::Session;
2020
use rustc_span::source_map::Spanned;
2121
use rustc_target::abi::call::{Conv,FnAbi,PassMode};
@@ -61,6 +61,9 @@ pub(crate) fn conv_to_call_conv(sess: &Session, c: Conv, default_call_conv: Call
6161
Conv::CCmseNonSecureCall => {
6262
sess.dcx().fatal("C-cmse-nonsecure-call call conv is not yet implemented");
6363
}
64+
Conv::CCmseNonSecureEntry => {
65+
sess.dcx().fatal("C-cmse-nonsecure-entry call conv is not yet implemented");
66+
}
6467

6568
Conv::Msp430Intr | Conv::PtxKernel | Conv::AvrInterrupt | Conv::AvrNonBlockingInterrupt => {
6669
unreachable!("tried to use {c:?} call conv which only exists on an unsupported target");

‎src/abi/pass_mode.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use cranelift_codegen::ir::{ArgumentExtension, ArgumentPurpose};
44
use rustc_target::abi::call::{
55
ArgAbi,ArgAttributes,ArgExtensionasRustcArgExtension,CastTarget,PassMode,Reg,RegKind,
66
};
7-
use smallvec::{smallvec,SmallVec};
7+
use smallvec::{SmallVec, smallvec};
88

99
usecrate::prelude::*;
1010
usecrate::value_and_place::assert_assignable;

‎src/abi/returning.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Return value handling
22
33
use rustc_target::abi::call::{ArgAbi,PassMode};
4-
use smallvec::{smallvec,SmallVec};
4+
use smallvec::{SmallVec, smallvec};
55

66
usecrate::prelude::*;
77

‎src/allocator.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Adapted from rustc
33

44
use rustc_ast::expand::allocator::{
5-
alloc_error_handler_name, default_fn_name, global_fn_name,AllocatorKind,AllocatorTy,
6-
ALLOCATOR_METHODS,NO_ALLOC_SHIM_IS_UNSTABLE,
5+
ALLOCATOR_METHODS,AllocatorKind,AllocatorTy,NO_ALLOC_SHIM_IS_UNSTABLE,
6+
alloc_error_handler_name, default_fn_name, global_fn_name,
77
};
88
use rustc_codegen_ssa::base::allocator_kind_for_codegen;
99
use rustc_session::config::OomStrategy;

‎src/base.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
//! Codegen of a single function
22
3-
use cranelift_codegen::ir::UserFuncName;
43
use cranelift_codegen::CodegenError;
4+
use cranelift_codegen::ir::UserFuncName;
55
use cranelift_frontend::{FunctionBuilder,FunctionBuilderContext};
66
use cranelift_module::ModuleError;
77
use rustc_ast::InlineAsmOptions;
88
use rustc_codegen_ssa::base::is_call_from_compiler_builtins_to_upstream_monomorphization;
99
use rustc_index::IndexVec;
1010
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
11+
use rustc_middle::ty::TypeVisitableExt;
1112
use rustc_middle::ty::adjustment::PointerCoercion;
1213
use rustc_middle::ty::layout::FnAbiOf;
1314
use rustc_middle::ty::print::with_no_trimmed_paths;
14-
use rustc_middle::ty::TypeVisitableExt;
1515

1616
usecrate::constant::ConstantCx;
1717
usecrate::debuginfo::{FunctionDebugContext,TypeDebugContext};

0 commit comments

Comments
 (0)