Skip to content

Commit

Permalink
Limited -Zregparm support (no Rust calling conv) descriptions
Browse files Browse the repository at this point in the history
Co-authored-by: Jubilee <[email protected]>
  • Loading branch information
azhogin and workingjubilee authored Oct 20, 2024
1 parent b9c9678 commit 37dc4ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,8 @@ options! {
"randomize the layout of types (default: no)"),
regparm: Option<u32> = (None, parse_opt_number, [TRACKED],
"On x86-32 targets, setting this to N causes the compiler to pass N arguments \
in registers EAX, EDX, and ECX instead of on the stack.\
in registers EAX, EDX, and ECX instead of on the stack for\
\"C\", \"cdecl\", and \"stdcall\" fn.\
It is UNSOUND to link together crates that use different values for this flag!"),
relax_elf_relocations: Option<bool> = (None, parse_opt_bool, [TRACKED],
"whether ELF relocations can be relaxed"),
Expand Down
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/compiler-flags/regparm.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The tracking issue for this feature is: https://github.com/rust-lang/rust/issues
------------------------

Option -Zregparm=N causes the compiler to pass N arguments
in registers EAX, EDX, and ECX instead of on the stack.
in registers EAX, EDX, and ECX instead of on the stack for "C", "cdecl", and "stdcall" fn.
It is UNSOUND to link together crates that use different values for this flag.
It is only supported on `x86`.

Expand Down

0 comments on commit 37dc4ec

Please sign in to comment.