Skip to content
Snippets Groups Projects
Commit a7c8f7ee authored by Arthur Cohen's avatar Arthur Cohen
Browse files

gccrs: intrinsics: Add early implementation for atomic_store_{seqcst, 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.
parent 514284ec
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment