Skip to content

Commit

Permalink
build: Update toolchain to nightly-2024-05-13
Browse files Browse the repository at this point in the history
With this update, some of the target json definitions need to be
updated, and some experimental functions are updated.

Signed-off-by: Akira Moroo <[email protected]>
  • Loading branch information
retrage committed May 20, 2024
1 parent 947ab0b commit 97de41f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion riscv64gcv-unknown-none-elf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"arch": "riscv64",
"code-model": "medium",
"cpu": "generic-rv64",
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n64-S128",
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"features": "+m,+a,-f,+d,+c,-v",
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2023-11-11"
channel = "nightly-2024-05-13"
components = ["rust-src", "clippy", "rustfmt"]
targets = [
"aarch64-unknown-linux-gnu",
Expand Down
1 change: 0 additions & 1 deletion src/fat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{
block::{Error as BlockError, SectorBuf, SectorRead},
mem::MemoryRegion,
};
use core::convert::TryFrom;

#[repr(packed)]
struct Header {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Copyright © 2019 Intel Corporation

#![feature(asm_const)]
#![feature(exposed_provenance)]
#![feature(slice_take)]
#![feature(stdsimd)]
#![feature(stmt_expr_attributes)]
#![feature(strict_provenance)]
#![feature(sync_unsafe_cell)]
Expand Down
8 changes: 4 additions & 4 deletions src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl MemoryRegion {
T: Copy + Sized,
{
assert!((offset + (core::mem::size_of::<T>() - 1) as u64) < self.length);
let ptr: *const T = core::ptr::from_exposed_addr((self.base + offset) as usize);
let ptr: *const T = core::ptr::with_exposed_provenance((self.base + offset) as usize);
unsafe { ptr.read_unaligned() }
}

Expand Down Expand Up @@ -70,7 +70,7 @@ impl MemoryRegion {
T: Sized,
{
assert!((offset + (core::mem::size_of::<T>() - 1) as u64) < self.length);
let ptr: *mut T = core::ptr::from_exposed_addr_mut((self.base + offset) as usize);
let ptr: *mut T = core::ptr::with_exposed_provenance_mut((self.base + offset) as usize);
unsafe { core::ptr::write_unaligned(ptr, value) }
}

Expand Down Expand Up @@ -100,7 +100,7 @@ impl MemoryRegion {
T: Copy + Sized,
{
assert!((offset + (core::mem::size_of::<T>() - 1) as u64) < self.length);
let ptr: *const T = core::ptr::from_exposed_addr((self.base + offset) as usize);
let ptr: *const T = core::ptr::with_exposed_provenance((self.base + offset) as usize);
unsafe { ptr.read_volatile() }
}

Expand Down Expand Up @@ -130,7 +130,7 @@ impl MemoryRegion {
T: Sized,
{
assert!((offset + (core::mem::size_of::<T>() - 1) as u64) < self.length);
let ptr: *mut T = core::ptr::from_exposed_addr_mut((self.base + offset) as usize);
let ptr: *mut T = core::ptr::with_exposed_provenance_mut((self.base + offset) as usize);
unsafe { core::ptr::write_volatile(ptr, value) }
}

Expand Down
2 changes: 1 addition & 1 deletion x86_64-unknown-none.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"llvm-target": "x86_64-unknown-none",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"arch": "x86_64",
"target-endian": "little",
"target-pointer-width": "64",
Expand Down

0 comments on commit 97de41f

Please sign in to comment.