mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-27 01:55:11 -04:00
0e238fd6c3
Support using const pointers in asm `const` operand Implements [RFC#3848](https://github.com/rust-lang/rfcs/pull/3848) with tracking issue rust-lang/rust#128464 This adds support of const pointers for asm `const` in addition to plain integers. The inline `asm!` support is implemented using `i` constraint, and the `global_asm!` and `naked_asm!` support is implemented by inserting `symbol + offset` and make `symbol` compiler-used. For unnamed consts, it will create additional internal & hidden symbols so that they can be referenced by global_asm. ~~The feature is also implemented for GCC backend but it's untested.~~ Tested now.