<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_target/src/asm/mod.rs, branch cargo_update</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=cargo_update</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=cargo_update'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-09-21T04:48:22+00:00</updated>
<entry>
<title>Support ctr and lr as clobber-only registers in PowerPC inline assembly</title>
<updated>2025-09-21T04:48:22+00:00</updated>
<author>
<name>Taiki Endo</name>
<email>te316e89@gmail.com</email>
</author>
<published>2025-09-21T04:48:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f4b876867d609404be8a78220c0d5117303bb0f8'/>
<id>urn:sha1:f4b876867d609404be8a78220c0d5117303bb0f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add new Tier-3 targets: `loongarch32-unknown-none*`</title>
<updated>2025-06-06T00:19:38+00:00</updated>
<author>
<name>WANG Rui</name>
<email>wangrui@loongson.cn</email>
</author>
<published>2025-01-09T12:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=38d69c3f571b668c82cfb90e5bea8bc86530530c'/>
<id>urn:sha1:38d69c3f571b668c82cfb90e5bea8bc86530530c</id>
<content type='text'>
MCP: https://github.com/rust-lang/compiler-team/issues/865
</content>
</entry>
<entry>
<title>Rollup merge of #136239 - folkertdev:show-supported-register-classes, r=SparrowLii,jieyouxu</title>
<updated>2025-02-11T17:04:34+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2025-02-11T17:04:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=65d20f39f3d1706d239abb53ef271b5612ec60e7'/>
<id>urn:sha1:65d20f39f3d1706d239abb53ef271b5612ec60e7</id>
<content type='text'>
show supported register classes in error message

a simple diagnostic change that shows the supported register classes when an invalid one is found.

This information can be hard to find (especially for unstable targets), and this message now gives at least something to try or search for. I've followed the pattern for invalid clobber ABIs.

`@rustbot` label +A-inline-assembly
</content>
</entry>
<entry>
<title>compiler: make rustc_target have less weird reexports</title>
<updated>2025-02-06T09:39:46+00:00</updated>
<author>
<name>Jubilee Young</name>
<email>workingjubilee@gmail.com</email>
</author>
<published>2024-11-03T04:44:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=89da3614e53a1fbebf61ec58c32ca26e371211ae'/>
<id>urn:sha1:89da3614e53a1fbebf61ec58c32ca26e371211ae</id>
<content type='text'>
rustc_target has had a lot of weird reexports for various reasons, but
now we're at a point where we can actually start reducing their number.
We remove weird shadowing-dependent behavior and import directly from
rustc_abi instead of doing weird renaming imports.

This is only incremental progress and does not entirely fix the crate.
</content>
</entry>
<entry>
<title>show supported register classes</title>
<updated>2025-01-29T11:15:12+00:00</updated>
<author>
<name>Folkert de Vries</name>
<email>folkert@folkertdev.nl</email>
</author>
<published>2025-01-29T10:57:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fbd30ea35fb79d73faa9d5b3feae391fed5336c8'/>
<id>urn:sha1:fbd30ea35fb79d73faa9d5b3feae391fed5336c8</id>
<content type='text'>
in inline assembly, show the supported register classes when an invalid one is found
</content>
</entry>
<entry>
<title>Support clobber_abi in BPF inline assembly</title>
<updated>2025-01-28T17:14:25+00:00</updated>
<author>
<name>Taiki Endo</name>
<email>te316e89@gmail.com</email>
</author>
<published>2025-01-28T17:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e586382febf7d03ac330595dcf578184fccbd971'/>
<id>urn:sha1:e586382febf7d03ac330595dcf578184fccbd971</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Re-export more `rustc_span::symbol` things from `rustc_span`.</title>
<updated>2024-12-18T02:38:53+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-12-12T23:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2620eb42d72d24baa1ca1056a769862b92c85f7f'/>
<id>urn:sha1:2620eb42d72d24baa1ca1056a769862b92c85f7f</id>
<content type='text'>
`rustc_span::symbol` defines some things that are re-exported from
`rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some
closely related things such as `Ident` and `kw`. So you can do `use
rustc_span::{Symbol, sym}` but you have to do `use
rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good
reason.

This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`,
and changes many `rustc_span::symbol::` qualifiers in `compiler/` to
`rustc_span::`. This is a 200+ net line of code reduction, mostly
because many files with two `use rustc_span` items can be reduced to
one.
</content>
</entry>
<entry>
<title>Support `clobber_abi` for AVR inline assembly</title>
<updated>2024-11-28T15:12:02+00:00</updated>
<author>
<name>Julian Frimmel</name>
<email>julian@fri-me.de</email>
</author>
<published>2024-10-06T10:33:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ba7316655645c020263e207ee9c036131b511d45'/>
<id>urn:sha1:ba7316655645c020263e207ee9c036131b511d45</id>
<content type='text'>
This commit adds the relevant registers to the list of clobbered regis-
ters (part of #93335). This follows the [ABI documentation] of AVR-GCC:

&gt; The [...] call-clobbered general purpose registers (GPRs) are
&gt; registers that might be destroyed (clobbered) by a function call.
&gt;
&gt; - **R18–R27, R30, R31**
&gt;
&gt;   These GPRs are call clobbered. An ordinary function may use them
&gt;   without restoring the contents. [...]
&gt;
&gt; - **R0, T-Flag**
&gt;
&gt;   The temporary register and the T-flag in SREG are also call-
&gt;   clobbered, but this knowledge is not exposed explicitly to the
&gt;   compiler (R0 is a fixed register).

Therefore this commit lists the aforementioned registers `r18–r27`,
`r30` and `r31` as clobbered registers. Since the `r0` register (listed
above as well) is not available in inline assembly at all (potentially
because the AVR-GCC considers it a fixed register causing the register
to never be used in register allocation and LLVM adopting this), there
is no need to list it in the clobber list (the `r0`-variant is not even
available). A comment was added to ensure, that the `r0` gets added to
the clobber-list once the register gets usable in inline ASM.
Since the SREG is normally considered clobbered anyways (unless the user
supplies the `preserve_flags`-option), there is no need to explicitly
list a bit in this register (which is not possible to list anyways).

Note, that this commit completely ignores the case of interrupts (that
are described in the ABI-specification), since every register touched in
an ISR need to be saved anyways.

[ABI documentation]: https://gcc.gnu.org/wiki/avr-gcc#Call-Used_Registers
</content>
</entry>
<entry>
<title>Rollup merge of #133463 - taiki-e:aarch64-asm-x18, r=Amanieu</title>
<updated>2024-11-28T11:06:02+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-11-28T11:06:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=23bab15d732ea34af6537f08f24c7be319ec1161'/>
<id>urn:sha1:23bab15d732ea34af6537f08f24c7be319ec1161</id>
<content type='text'>
Fix handling of x18 in AArch64 inline assembly on ohos/trusty or with -Zfixed-x18

Currently AArch64 inline assembly allows using x18 on ohos/trusty or with -Zfixed-x18.

https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/asm/aarch64.rs#L74-L76

However, x18 is reserved in these environments and should not be allowed in the input/output operands of inline assemblies as it is in Android, Windows, etc..

https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs#L19
https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_trusty.rs#L18
https://github.com/rust-lang/rust/blob/7db7489f9bc274cb60c4956bfa56de0185eb1b9b/compiler/rustc_codegen_llvm/src/llvm_util.rs#L764-L771

(As for ohos, +reserve-x18 is [redundant](https://github.com/llvm/llvm-project/commit/c417b7a695704d5bc3be23f34d1bfa505f5172de#diff-0ddf23e0bf2b28b2d05f842f087d1e6f694e8e06d1765e8d0f10d47fddcdff9c) since https://github.com/rust-lang/rust/commit/7a966b918870485e9b364e77f50c511f8c2cc275 that starting using llvm's ohos targets. So removed it from target-spec.)

This fix may potentially break the code for tier 2 target (aarch64-unknown-linux-ohos). (As for others, aarch64-unknown-trusty is tier 3 and -Zfixed-x18 is unstable so breaking them should be fine.)
However, in any case, it seems suspicious that the code that is broken by this was sound.

r? `@Amanieu`

`@rustbot` label O-AArch64 +A-inline-assembly
</content>
</entry>
<entry>
<title>Rollup merge of #133422 - taiki-e:riscv-e-clobber-abi, r=Amanieu</title>
<updated>2024-11-28T11:06:01+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-11-28T11:06:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=89ae19ee0dba8966f21153794358da8c5ac05a51'/>
<id>urn:sha1:89ae19ee0dba8966f21153794358da8c5ac05a51</id>
<content type='text'>
Fix clobber_abi in RV32E and RV64E inline assembly

Currently clobber_abi in RV32E and RV64E inline assembly is implemented using InlineAsmClobberAbi::RiscV, but broken since x16-x31 cannot be used in RV32E and RV64E.

```
error: cannot use register `x16`: register can't be used with the `e` target feature
  --&gt; &lt;source&gt;:42:14
   |
42 |     asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
   |              ^^^^^^^^^^^^^^^^

error: cannot use register `x17`: register can't be used with the `e` target feature
  --&gt; &lt;source&gt;:42:14
   |
42 |     asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
   |              ^^^^^^^^^^^^^^^^

error: cannot use register `x28`: register can't be used with the `e` target feature
  --&gt; &lt;source&gt;:42:14
   |
42 |     asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
   |              ^^^^^^^^^^^^^^^^

error: cannot use register `x29`: register can't be used with the `e` target feature
  --&gt; &lt;source&gt;:42:14
   |
42 |     asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
   |              ^^^^^^^^^^^^^^^^

error: cannot use register `x30`: register can't be used with the `e` target feature
  --&gt; &lt;source&gt;:42:14
   |
42 |     asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
   |              ^^^^^^^^^^^^^^^^

error: cannot use register `x31`: register can't be used with the `e` target feature
  --&gt; &lt;source&gt;:42:14
   |
42 |     asm!("", clobber_abi("C"), options(nostack, nomem, preserves_flags));
   |              ^^^^^^^^^^^^^^^^
```

r? `@Amanieu`

`@rustbot` label O-riscv +A-inline-assembly
</content>
</entry>
</feed>
