Skip to content

Commit 17f30e5

Browse files
committedMay 13, 2021
Auto merge of #84107 - Amanieu:global_asm2, r=nagisa
Add support for const operands and options to global_asm! On x86, the default syntax is also switched to Intel to match asm!. Currently `global_asm!` only supports `const` operands and the `att_syntax` option. In the future, `sym` operands will also be supported. However there is no plan to support any of the other operand types or options since they don't make sense in the context of `global_asm!`. r? `@nagisa`
·
1.88.01.54.0
2 parents 6d395a1 + a7ed6a5 commit 17f30e5

File tree

56 files changed

+1424
-842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1424
-842
lines changed
 

‎Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ dependencies = [
655655

656656
[[package]]
657657
name = "compiler_builtins"
658-
version = "0.1.39"
658+
version = "0.1.43"
659659
source = "registry+https://github.com/rust-lang/crates.io-index"
660-
checksum = "3748f82c7d366a0b4950257d19db685d4958d2fa27c6d164a3f069fec42b748b"
660+
checksum = "65af2dcae4779003dfa91aedc6ade7bdc7ba685944e50a8b4f9380df376a4466"
661661
dependencies = [
662662
"cc",
663663
"rustc-std-workspace-core",

‎compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2279,14 +2279,6 @@ pub struct ForeignMod {
22792279
pub items: Vec<P<ForeignItem>>,
22802280
}
22812281

2282-
/// Global inline assembly.
2283-
///
2284-
/// Also known as "module-level assembly" or "file-scoped assembly".
2285-
#[derive(Clone, Encodable, Decodable, Debug, Copy)]
2286-
pub struct GlobalAsm {
2287-
pub asm: Symbol,
2288-
}
2289-
22902282
#[derive(Clone, Encodable, Decodable, Debug)]
22912283
pub struct EnumDef {
22922284
pub variants: Vec<Variant>,
@@ -2669,7 +2661,7 @@ pub enum ItemKind {
26692661
/// E.g., `extern {}` or `extern "C" {}`.
26702662
ForeignMod(ForeignMod),
26712663
/// Module-level inline assembly (from `global_asm!()`).
2672-
GlobalAsm(GlobalAsm),
2664+
GlobalAsm(InlineAsm),
26732665
/// A type alias (`type`).
26742666
///
26752667
/// E.g., `type Foo = Bar<u8>;`.

0 commit comments

Comments
 (0)
Please sign in to comment.