aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-builtins.h
AgeCommit message (Collapse)AuthorFilesLines
2023-02-21gccrs: intrinsics: Add early implementation for atomic_store_{seqcst, ↵Arthur Cohen1-1/+1
relaxed, release} gcc/rust/ChangeLog: * backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): New function. (BuiltinsContext::setup): Call `setup_atomic_fns`. * backend/rust-builtins.h: Declare `setup_atomic_fns`. * backend/rust-compile-intrinsic.cc (atomic_store_handler_inner): New function. (atomic_store_handler): New handler. (make_unsigned_long_tree): Add helper around making unsigned long trees. (prefetch_data_handler): Use `make_unsigned_long_tree`. (build_atomic_builtin_name): New function. gcc/testsuite/ChangeLog: * rust/compile/torture/intrinsics-4.rs: New test. * rust/compile/torture/intrinsics-5.rs: New test. * rust/execute/torture/atomic_store.rs: New test.
2023-02-21gccrs: builtins: Move implementation into source fileArthur Cohen1-108/+12
gcc/rust/ChangeLog: * Make-lang.in: Add `rust-builtins.o` as target * backend/rust-builtins.h: Refactor to new file. * backend/rust-builtins.cc: New file.
2023-01-31gccrs: builtins: Add add_overflow builtin and refactor classArthur Cohen1-15/+36
gcc/rust/ChangeLog: * backend/rust-builtins.h: Refactor builtin context class and add overflow builtins.
2022-12-13gccrs: Add base for HIR to GCC GENERIC loweringPhilip Herron1-0/+189
This pass walks the HIR crate and turns them into GCC `tree`s. We do not have any Rust specific tree's. We are slowly removing the backend abstraction which was ported over from gccgo in favour of using `tree`s directly. gcc/rust/ * backend/rust-builtins.h: New. * backend/rust-compile-base.cc: New. * backend/rust-compile-base.h: New. * backend/rust-mangle.cc: New. * backend/rust-mangle.h: New. * backend/rust-tree.cc: New. * backend/rust-tree.h: New. * rust-backend.h: New. * rust-gcc.cc: New. Co-authored-by: David Faust <david.faust@oracle.com>