Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ rm -r tests/run-make/panic-abort-eh_frame # .eh_frame emitted with panic=abort

# bugs in the test suite
# ======================
rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
rm tests/ui/process/nofile-limit.rs # FIXME some AArch64 linking issue
rm -r tests/ui/codegen/equal-pointers-unequal # make incorrect assumptions about the location of stack variables
rm -r tests/incremental/extern_static/issue-49153.rs # assumes reference to undefined static gets optimized away

Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ fn codegen_float_intrinsic_call<'tcx>(
sym::fmaf64 => ("fma", 3, fx.tcx.types.f64, types::F64),
sym::fmaf128 => ("fmaf128", 3, fx.tcx.types.f128, types::F128),
// FIXME: calling `fma` from libc without FMA target feature uses expensive sofware emulation
sym::fmuladdf16 => ("fmaf16", 3, fx.tcx.types.f16, types::F16), // TODO: use cranelift intrinsic analogous to llvm.fmuladd.f16
sym::fmuladdf32 => ("fmaf", 3, fx.tcx.types.f32, types::F32), // TODO: use cranelift intrinsic analogous to llvm.fmuladd.f32
sym::fmuladdf64 => ("fma", 3, fx.tcx.types.f64, types::F64), // TODO: use cranelift intrinsic analogous to llvm.fmuladd.f64
sym::fmuladdf128 => ("fmaf128", 3, fx.tcx.types.f128, types::F128), // TODO: use cranelift intrinsic analogous to llvm.fmuladd.f128
sym::fmuladdf16 => ("fmaf16", 3, fx.tcx.types.f16, types::F16), // FIXME: use cranelift intrinsic analogous to llvm.fmuladd.f16
sym::fmuladdf32 => ("fmaf", 3, fx.tcx.types.f32, types::F32), // FIXME: use cranelift intrinsic analogous to llvm.fmuladd.f32
sym::fmuladdf64 => ("fma", 3, fx.tcx.types.f64, types::F64), // FIXME: use cranelift intrinsic analogous to llvm.fmuladd.f64
sym::fmuladdf128 => ("fmaf128", 3, fx.tcx.types.f128, types::F128), // FIXME: use cranelift intrinsic analogous to llvm.fmuladd.f128
sym::copysignf16 => ("copysignf16", 2, fx.tcx.types.f16, types::F16),
sym::copysignf32 => ("copysignf", 2, fx.tcx.types.f32, types::F32),
sym::copysignf64 => ("copysign", 2, fx.tcx.types.f64, types::F64),
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_gcc/.github/workflows/failures.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO: refactor to avoid duplication with the ci.yml file.
# FIXME: refactor to avoid duplication with the ci.yml file.
name: Failures

on:
Expand Down Expand Up @@ -92,15 +92,15 @@ jobs:
run: ./y.sh prepare

- name: Run tests
# TODO: re-enable those tests for libgccjit 12.
# FIXME: re-enable those tests for libgccjit 12.
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
id: tests
run: |
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --clean --build-sysroot --test-failing-rustc ${{ matrix.libgccjit_version.extra }} 2>&1 | tee output_log
rg --text "test result" output_log >> $GITHUB_STEP_SUMMARY
- name: Run failing ui pattern tests for ICE
# TODO: re-enable those tests for libgccjit 12.
# FIXME: re-enable those tests for libgccjit 12.
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
id: ui-tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/.github/workflows/m68k.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO: check if qemu-user-static-binfmt is needed (perhaps to run some tests since it probably calls exec).
# FIXME: check if qemu-user-static-binfmt is needed (perhaps to run some tests since it probably calls exec).

name: m68k CI

Expand All @@ -24,7 +24,7 @@ jobs:
matrix:
commands: [
"--std-tests",
# TODO(antoyo): fix those on m68k.
# FIXME(antoyo): fix those on m68k.
#"--test-libcore",
#"--extended-rand-tests",
#"--extended-regex-example-tests",
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/.github/workflows/stdarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install packages
run: sudo apt-get install ninja-build ripgrep

# TODO: remove when we have binutils version 2.43 in the repo.
# FIXME: remove when we have binutils version 2.43 in the repo.
- name: Install more recent binutils
run: |
echo "deb http://archive.ubuntu.com/ubuntu plucky main universe" | sudo tee /etc/apt/sources.list.d/plucky-copies.list
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
if: ${{ matrix.cargo_runner }}
run: |
# FIXME: these tests fail when the sysroot is compiled with LTO because of a missing symbol in proc-macro.
# TODO: remove --skip test_tile_ when it's implemented.
# FIXME: remove --skip test_tile_ when it's implemented.
STDARCH_TEST_SKIP_FUNCTION="xsave,xsaveopt,xsave64,xsaveopt64" STDARCH_TEST_EVERYTHING=1 CHANNEL=release CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="${{ matrix.cargo_runner }}" TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ./y.sh cargo test --manifest-path build/build_sysroot/sysroot_src/library/stdarch/Cargo.toml -- --skip rtm --skip tbm --skip sse4a --skip test_tile_
# Summary job for the merge queue.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/build_system/src/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ fn prepare_libcore(
Ok(())
}

// TODO: remove when we can ignore warnings in rustdoc tests.
// FIXME: remove when we can ignore warnings in rustdoc tests.
fn prepare_rand() -> Result<(), String> {
// Apply patch for the rand crate.
let file_path = "patches/crates/0001-Remove-deny-warnings.patch";
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_gcc/build_system/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ fn build_sysroot(env: &Env, args: &TestArg) -> Result<(), String> {
Ok(())
}

// TODO(GuillaumeGomez): when rewriting in Rust, refactor with the code in tests/lang_tests_common.rs if possible.
// FIXME(GuillaumeGomez): when rewriting in Rust, refactor with the code in tests/lang_tests_common.rs if possible.
fn maybe_run_command_in_vm(
command: &[&dyn AsRef<OsStr>],
env: &Env,
Expand Down Expand Up @@ -648,16 +648,16 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> {
"https://github.com/BurntSushi/memchr",
"https://github.com/dtolnay/itoa",
"https://github.com/rust-lang/cfg-if",
//"https://github.com/rust-lang-nursery/lazy-static.rs", // TODO: re-enable when the
//"https://github.com/rust-lang-nursery/lazy-static.rs", // FIXME: re-enable when the
//failing test is fixed upstream.
//"https://github.com/marshallpierce/rust-base64", // FIXME: one test is OOM-killed.
// TODO: ignore the base64 test that is OOM-killed.
// FIXME: ignore the base64 test that is OOM-killed.
//"https://github.com/time-rs/time", // FIXME: one test fails (https://github.com/time-rs/time/issues/719).
"https://github.com/rust-lang/log",
"https://github.com/bitflags/bitflags",
//"https://github.com/serde-rs/serde", // FIXME: one test fails.
//"https://github.com/rayon-rs/rayon", // TODO: very slow, only run on master?
//"https://github.com/rust-lang/cargo", // TODO: very slow, only run on master?
//"https://github.com/rayon-rs/rayon", // FIXME: very slow, only run on master?
//"https://github.com/rust-lang/cargo", // FIXME: very slow, only run on master?
];

let mut env = env.clone();
Expand Down Expand Up @@ -699,7 +699,7 @@ fn test_libcore(env: &Env, args: &TestArg) -> Result<(), String> {
println!("[TEST] libcore");
let path = get_sysroot_dir().join("sysroot_src/library/coretests");
let _ = remove_dir_all(path.join("target"));
// TODO(antoyo): run in release mode when we fix the failures.
// FIXME(antoyo): run in release mode when we fix the failures.
run_cargo_command(&[&"test"], Some(&path), env, args)?;
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/doc/debugging-libgccjit.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ Maybe by calling the following at the beginning of gdb:
set substitute-path /usr/src/debug/gcc /path/to/gcc-repo/gcc
```

TODO(antoyo): but that's not what I remember I was doing.
FIXME(antoyo): but that's not what I remember I was doing.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/doc/subtree.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ git push
PATH="$HOME/bin:$PATH" ~/bin/git-subtree push -P compiler/rustc_codegen_gcc/ ../rustc_codegen_gcc/ sync_branch_name
```

TODO: write a script that does the above.
FIXME: write a script that does the above.

https://rust-lang.zulipchat.com/#narrow/stream/301329-t-devtools/topic/subtree.20madness/near/258877725
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ fn main() {
}
}

// TODO(antoyo): to make this work, support weak linkage.
// FIXME(antoyo): to make this work, support weak linkage.
//unsafe { assert_eq!(ABC as usize, 0); }

&mut (|| Some(0 as *const ())) as &mut dyn FnMut() -> Option<*const ()>;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub struct FnAbiGcc<'gcc> {
}

pub trait FnAbiGccExt<'gcc, 'tcx> {
// TODO(antoyo): return a function pointer type instead?
// FIXME(antoyo): return a function pointer type instead?
fn gcc_type(&self, cx: &CodegenCx<'gcc, 'tcx>) -> FnAbiGcc<'gcc>;
fn ptr_to_gcc_type(&self, cx: &CodegenCx<'gcc, 'tcx>) -> Type<'gcc>;
#[cfg(feature = "master")]
Expand Down Expand Up @@ -260,7 +260,7 @@ pub fn conv_to_fn_attribute<'gcc>(conv: CanonAbi, arch: &Arch) -> Option<FnAttri
&Arch::Nvptx64 => FnAttribute::NvptxKernel,
arch => panic!("Arch {arch} does not support GpuKernel calling convention"),
},
// TODO(antoyo): check if those AVR attributes are mapped correctly.
// FIXME(antoyo): check if those AVR attributes are mapped correctly.
CanonAbi::Interrupt(interrupt_kind) => match interrupt_kind {
InterruptKind::Avr => FnAttribute::AvrSignal,
InterruptKind::AvrNonBlocking => FnAttribute::AvrInterrupt,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fn create_wrapper_function(
)));

if tcx.sess.must_emit_unwind_tables() {
// TODO(antoyo): emit unwind tables.
// FIXME(antoyo): emit unwind tables.
}

let block = func.new_block("entry");
Expand Down Expand Up @@ -138,6 +138,6 @@ fn create_wrapper_function(
block.end_with_void_return(None);
}

// TODO(@Commeownist): Check if we need to emit some extra debugging info in certain circumstances
// FIXME(@Commeownist): Check if we need to emit some extra debugging info in certain circumstances
// as described in https://github.com/rust-lang/rust/commit/77a96ed5646f7c3ee8897693decc4626fe380643
}
24 changes: 12 additions & 12 deletions compiler/rustc_codegen_gcc/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
}

InlineAsmOperandRef::SymFn { instance } => {
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O)
// or byte count suffixes (x86 Windows).
constants_len += self.tcx.symbol_name(instance).name.len();
}
InlineAsmOperandRef::SymStatic { def_id } => {
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O).
constants_len +=
self.tcx.symbol_name(Instance::mono(self.tcx, def_id)).name.len();
Expand Down Expand Up @@ -440,7 +440,7 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
match *piece {
InlineAsmTemplatePiece::String(ref string) => {
for char in string.chars() {
// TODO(antoyo): might also need to escape | if rustc doesn't do it.
// FIXME(antoyo): might also need to escape | if rustc doesn't do it.
let escaped_char = match char {
'%' => "%%",
'{' => "%{",
Expand Down Expand Up @@ -496,15 +496,15 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
}

InlineAsmOperandRef::SymFn { instance } => {
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O)
// or byte count suffixes (x86 Windows).
let name = self.tcx.symbol_name(instance).name;
template_str.push_str(name);
}

InlineAsmOperandRef::SymStatic { def_id } => {
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O).
let instance = Instance::mono(self.tcx, def_id);
let name = self.tcx.symbol_name(instance).name;
Expand Down Expand Up @@ -557,7 +557,7 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {
// "cc" is cr0 on powerpc.
}
// TODO(@Commeownist): I'm not 100% sure this one clobber is sufficient
// FIXME(@Commeownist): I'm not 100% sure this one clobber is sufficient
// on all architectures. For instance, what about FP stack?
_ => {
extended_asm.add_clobber("cc");
Expand All @@ -571,7 +571,7 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
extended_asm.set_volatile_flag(true);
}
if !options.contains(InlineAsmOptions::NOSTACK) {
// TODO(@Commeownist): figure out how to align stack
// FIXME(@Commeownist): figure out how to align stack
}
if dest.is_none() && options.contains(InlineAsmOptions::NORETURN) {
let builtin_unreachable = self.context.get_builtin_function("__builtin_unreachable");
Expand Down Expand Up @@ -640,7 +640,7 @@ fn explicit_reg_to_gcc(reg: InlineAsmReg) -> &'static str {
// For explicit registers, we have to create a register variable: https://stackoverflow.com/a/31774784/389119
match reg {
InlineAsmReg::X86(reg) => {
// TODO(antoyo): add support for vector register.
// FIXME(antoyo): add support for vector register.
match reg.reg_class() {
X86InlineAsmRegClass::reg_byte => {
// GCC does not support the `b` suffix, so we just strip it
Expand Down Expand Up @@ -901,16 +901,16 @@ impl<'gcc, 'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
GlobalAsmOperandRef::SymFn { instance } => {
let function = get_fn(self, instance);
self.add_used_function(function);
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O)
// or byte count suffixes (x86 Windows).
let name = self.tcx.symbol_name(instance).name;
template_str.push_str(name);
}

GlobalAsmOperandRef::SymStatic { def_id } => {
// TODO(antoyo): set the global variable as used.
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(antoyo): set the global variable as used.
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O).
let instance = Instance::mono(self.tcx, def_id);
let name = self.tcx.symbol_name(instance).name;
Expand All @@ -930,7 +930,7 @@ impl<'gcc, 'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
}

fn mangled_name(&self, instance: Instance<'tcx>) -> String {
// TODO(@Amanieu): Additional mangling is needed on
// FIXME(@Amanieu): Additional mangling is needed on
// some targets to add a leading underscore (Mach-O)
// or byte count suffixes (x86 Windows).
self.tcx.symbol_name(instance).name.to_string()
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_gcc/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
.map(|features| features.name.as_str())
.flat_map(|feat| to_gcc_features(cx.tcx.sess, feat).into_iter())
.chain(codegen_fn_attrs.instruction_set.iter().map(|x| match *x {
InstructionSetAttr::ArmA32 => "-thumb-mode", // TODO(antoyo): support removing feature.
InstructionSetAttr::ArmA32 => "-thumb-mode", // FIXME(antoyo): support removing feature.
InstructionSetAttr::ArmT32 => "thumb-mode",
}))
.collect::<Vec<_>>();

// TODO(antoyo): cg_llvm adds global features to each function so that LTO keep them.
// FIXME(antoyo): cg_llvm adds global features to each function so that LTO keep them.
// Check if GCC requires the same.
let mut global_features = cx.tcx.global_backend_features(()).iter().map(|s| s.as_str());
function_features.extend(&mut global_features);
let target_features = function_features
.iter()
.filter_map(|feature| {
// TODO(antoyo): support soft-float.
// FIXME(antoyo): support soft-float.
if feature.contains("soft-float") {
return None;
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_gcc/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Maybe that's because the combined object files contain the IR (true) and the final link
// does not remove it?
//
// TODO(antoyo): for performance, check which optimizations the C++ frontend enables.
// FIXME(antoyo): for performance, check which optimizations the C++ frontend enables.
// cSpell:disable
// Fix these warnings:
// /usr/bin/ld: warning: type of symbol `_RNvNvNvNtCs5JWOrf9uCus_5rayon11thread_pool19WORKER_THREAD_STATE7___getit5___KEY' changed from 1 to 6 in /tmp/ccKeUSiR.ltrans0.ltrans.o
Expand Down Expand Up @@ -39,7 +39,7 @@ use crate::errors::LtoBitcodeFromRlib;
use crate::{GccCodegenBackend, GccContext, LtoMode, to_gcc_opt_level};

struct LtoData {
// TODO(antoyo): use symbols_below_threshold.
// FIXME(antoyo): use symbols_below_threshold.
//symbols_below_threshold: Vec<String>,
upstream_modules: Vec<(SerializedModule<ModuleBuffer>, CString)>,
tmp_path: TempDir,
Expand Down Expand Up @@ -173,7 +173,7 @@ fn fat_lto(
.filter(|&(_, module)| module.kind == ModuleKind::Regular)
.map(|(i, _module)| {
//let cost = unsafe { llvm::LLVMRustModuleCost(module.module_llvm.llmod()) };
// TODO(antoyo): compute the cost of a module if GCC allows this.
// FIXME(antoyo): compute the cost of a module if GCC allows this.
(0, i)
})
.max();
Expand Down
Loading
Loading