Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/panic-handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "panic-handler"
version = "0.1.0"
authors = ["Alex Crichton <[email protected]>"]
edition = "2021"
edition = "2024"
publish = false

[dependencies]
2 changes: 1 addition & 1 deletion testcrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "testcrate"
version = "0.1.0"
authors = ["Alex Crichton <[email protected]>"]
edition = "2021"
edition = "2024"
publish = false

[lib]
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_add.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(f128_enabled, feature(f128))]

use compiler_builtins::float::add;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

float_bench! {
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_cmp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg_attr(f128_enabled, feature(f128))]

use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

use compiler_builtins::float::cmp;
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![cfg_attr(f128_enabled, feature(f128))]

use compiler_builtins::float::conv;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

/* unsigned int -> float */
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_div.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(f128_enabled, feature(f128))]

use compiler_builtins::float::div;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

float_bench! {
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_extend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![cfg_attr(f16_enabled, feature(f16))]

use compiler_builtins::float::extend;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

#[cfg(f16_enabled)]
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_mul.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(f128_enabled, feature(f128))]

use compiler_builtins::float::mul;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

float_bench! {
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_pow.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(f128_enabled, feature(f128))]

use compiler_builtins::float::pow;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

float_bench! {
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_sub.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![cfg_attr(f128_enabled, feature(f128))]

use compiler_builtins::float::sub;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

float_bench! {
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/float_trunc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![cfg_attr(f16_enabled, feature(f16))]

use compiler_builtins::float::trunc;
use criterion::{criterion_main, Criterion};
use criterion::{Criterion, criterion_main};
use testcrate::float_bench;

#[cfg(f16_enabled)]
Expand Down
2 changes: 1 addition & 1 deletion testcrate/benches/mem.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![feature(test)]

extern crate test;
use test::{black_box, Bencher};
use test::{Bencher, black_box};

extern crate compiler_builtins;
use compiler_builtins::mem::{memcmp, memcpy, memmove, memset};
Expand Down
7 changes: 6 additions & 1 deletion testcrate/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ pub fn skip_asm_checks(_test_name: &str) -> bool {

/// Create a comparison of the system symbol, compiler_builtins, and optionally handwritten
/// assembly.
///
/// # Safety
///
/// The signature must be correct and any assembly must be sound.
#[macro_export]
macro_rules! float_bench {
(
Expand Down Expand Up @@ -120,8 +124,9 @@ macro_rules! float_bench {
]
$(,)?
) => {paste::paste! {
// SAFETY: macro invocation must use the correct signature
#[cfg($sys_available)]
extern "C" {
unsafe extern "C" {
/// Binding for the system function
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
fn $sys_fn($($arg: $arg_ty),*) -> $ret_ty;
Expand Down
2 changes: 1 addition & 1 deletion testcrate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ extern crate alloc;
use compiler_builtins::float::Float;
use compiler_builtins::int::{Int, MinInt};

use rand_xoshiro::rand_core::{RngCore, SeedableRng};
use rand_xoshiro::Xoshiro128StarStar;
use rand_xoshiro::rand_core::{RngCore, SeedableRng};

/// Sets the number of fuzz iterations run for most tests. In practice, the vast majority of bugs
/// are caught by the edge case testers. Most of the remaining bugs triggered by more complex
Expand Down
2 changes: 1 addition & 1 deletion testcrate/tests/big.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use compiler_builtins::int::{i256, u256, HInt, MinInt};
use compiler_builtins::int::{HInt, MinInt, i256, u256};

const LOHI_SPLIT: u128 = 0xaaaaaaaaaaaaaaaaffffffffffffffff;

Expand Down
Loading