rust-lang / rust-lang/rust

Tracking Issue for `movrs` target feature

Open
#137,976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-tracking-issue T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Feature gate: #![feature(movrs_target_feature)]

This is a tracking issue for the x86(64) target feature movrs. It includes 2 instructions - MOVRS and PREFETCHRST2. These behave as normal MOV and PREFETCHW instructions, just with the "read-shared" hint. This, as suggested by the name, is purely a hint to the processor that the data loaded/stored by the instruction is likely to get accessed by multiple processors.

Public API

The movrs target feature (which enables the MOVRS and PREFETCHRST2 instructions) and the following stdarch intrinsics

  • _movrs_i8
  • _movrs_i16
  • _movrs_i32
  • _movrs_i64
  • _m_prefetchrs
Steps / History
  • Implementation
  • Final comment period (FCP)^1
  • Stabilization PR
Implementation History
  • #138003
  • rust-lang/stdarch#1763
Unresolved Questions
  • How does this interact with the memory model? The Intel specification strongly suggests that this is just a hint to the processor, but we need to check to be sure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with implementation PR #138003 and rust-lang/stdarch#1763, then review the movrs feature gate and listed intrinsics. Resolve the open memory-model question and determine whether the implementation is complete; done requires the Implementation, FCP, and Stabilization PR steps to be completed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.