Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fix for m68k #373

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 .github/workflows/m68k.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
"--mini-tests",
"--std-tests",
# TODO(antoyo): fix those on m68k.
#"--test-libcore",
"--test-libcore",
#"--extended-rand-tests",
#"--extended-regex-example-tests",
#"--extended-regex-tests",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 3f3f48e81b70d0ca8f3756171f246d6e75f2e6ba Mon Sep 17 00:00:00 2001
From: None <[email protected]>
Date: Fri, 27 Oct 2023 08:32:25 -0400
Subject: [PATCH] Remove failing test on targets where pointers aren't aligned
on 4 bytes

---
library/core/tests/ptr.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs
index ee885ad..836b944 100644
--- a/library/core/tests/ptr.rs
+++ b/library/core/tests/ptr.rs
@@ -717,7 +717,7 @@ fn is_aligned_const() {
assert!(ptr.is_aligned());
assert!(ptr.is_aligned_to(1));
assert!(ptr.is_aligned_to(2));
- assert!(ptr.is_aligned_to(4));
+ //assert!(ptr.is_aligned_to(4));
assert!(ptr.wrapping_byte_add(2).is_aligned_to(1));
assert!(ptr.wrapping_byte_add(2).is_aligned_to(2));
assert!(!ptr.wrapping_byte_add(2).is_aligned_to(4));
--
2.42.0

15 changes: 15 additions & 0 deletions run_in_vm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

vm_parent_dir=${CG_GCC_VM_DIR:-$(pwd)}
vm_dir=vm
exe=$1
exe_filename=$(basename $exe)
vm_home_dir=$vm_parent_dir/$vm_dir/home
vm_exe_path=$vm_home_dir/$exe_filename
inside_vm_exe_path=/home/$exe_filename
sudo cp $exe $vm_exe_path

shift
pushd $vm_parent_dir
sudo chroot $vm_dir qemu-m68k-static $inside_vm_exe_path $@
popd
15 changes: 12 additions & 3 deletions src/type_.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use gccjit::{RValue, Struct, Type};
use rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, TypeMembershipMethods};
use rustc_codegen_ssa::common::TypeKind;
use rustc_middle::{bug, ty};
use rustc_middle::{bug, ty::{self, ParamEnv, Ty}};

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit12.so, gcc12, --no-default-features, TEST_FLAGS='-Cpanic=abort -Zpanic-abort-test...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit12.so, gcc12, --no-default-features, TEST_FLAGS='-Cpanic=abort -Zpanic-abort-test...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-example-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --mini-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --std-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-rand-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (sde -future -rtm_mode full --)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-libcore)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (sde -future -rtm_mode full --)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --extended-regex-tests)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit_without_int128.so, master-without-128bit-integers, --test-successful-rustc --nb-...

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (libgccjit.so, master, --test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 1)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`

Check warning on line 4 in src/type_.rs

View workflow job for this annotation

GitHub Actions / build (--test-successful-rustc --nb-parts 2 --current-part 0)

unused imports: `ParamEnv`, `Ty`
use rustc_middle::ty::layout::TyAndLayout;
use rustc_target::abi::{AddressSpace, Align, Integer, Size};

Expand Down Expand Up @@ -55,12 +55,21 @@
}

pub fn type_ptr_to(&self, ty: Type<'gcc>) -> Type<'gcc> {
ty.make_pointer()
/*let rust_type = self.tcx.types.usize;
let rust_type = Ty::new_imm_ptr(self.tcx, rust_type);
let layout = self.tcx.layout_of(ParamEnv::reveal_all().and(rust_type)).unwrap();
let align = layout.align.abi.bytes();
println!("Align: {}", align);*/
ty.make_pointer()//.get_aligned(4)
}

pub fn type_ptr_to_ext(&self, ty: Type<'gcc>, _address_space: AddressSpace) -> Type<'gcc> {
// TODO(antoyo): use address_space, perhaps with TYPE_ADDR_SPACE?
ty.make_pointer()
/*let rust_type = self.tcx.types.usize; // TODO: use pointer type.
let rust_type = Ty::new_imm_ptr(self.tcx, rust_type);
let layout = self.tcx.layout_of(ParamEnv::reveal_all().and(rust_type)).unwrap();
let align = layout.align.abi.bytes();*/
ty.make_pointer()//.get_aligned(4)
}

pub fn type_i8p(&self) -> Type<'gcc> {
Expand Down
3 changes: 2 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,11 @@ function asm_tests() {
#./build_sysroot/build_sysroot.sh --release

function test_libcore() {
dir=$(pwd)
pushd build_sysroot/sysroot_src/library/core/tests
echo "[TEST] libcore"
rm -r ./target || true
../../../../../cargo.sh test
CARGO_TARGET_M68K_UNKNOWN_LINUX_GNU_RUNNER="CG_GCC_VM_DIR=$dir bash $dir/run_in_vm.sh" ../../../../../cargo.sh test --target m68k-unknown-linux-gnu -- --skip mem::align_of_32 --skip mem::align_of_basic --skip mem::align_of_val_basic --skip mem::offset_of --skip num::dec2flt::fast_path_correct --skip num::dec2flt::float::test_f32_integer_decode --skip num::dec2flt::float::test_f64_integer_decode --skip num::dec2flt::special_code_paths --skip ptr::nonnull_tagged_pointer_with_provenance
popd
}

Expand Down
Loading