Skip to content

Commit ada918b

Browse files
committed
Add support for const operands and options to global_asm!
On x86, the default syntax is also switched to Intel to match asm!
1 parent eaa9408 commit ada918b

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

alloc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ edition = "2018"
1111

1212
[dependencies]
1313
core = { path = "../core" }
14-
compiler_builtins = { version = "0.1.39", features = ['rustc-dep-of-std'] }
14+
compiler_builtins = { version = "0.1.40", features = ['rustc-dep-of-std'] }
1515

1616
[dev-dependencies]
1717
rand = "0.7"

core/src/macros/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,10 @@ pub(crate) mod builtin {
13581358
#[rustc_builtin_macro]
13591359
#[macro_export]
13601360
macro_rules! global_asm {
1361-
("assembly") => {
1361+
("assembly template",
1362+
$(operands,)*
1363+
$(options($(option),*))?
1364+
) => {
13621365
/* compiler built-in */
13631366
};
13641367
}

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ panic_unwind = { path = "../panic_unwind", optional = true }
1717
panic_abort = { path = "../panic_abort" }
1818
core = { path = "../core" }
1919
libc = { version = "0.2.93", default-features = false, features = ['rustc-dep-of-std'] }
20-
compiler_builtins = { version = "0.1.39" }
20+
compiler_builtins = { version = "0.1.40" }
2121
profiler_builtins = { path = "../profiler_builtins", optional = true }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.11", default-features = false, features = ['rustc-dep-of-std'] }

std/src/sys/sgx/abi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub mod tls;
1515
pub mod usercalls;
1616

1717
#[cfg(not(test))]
18-
global_asm!(include_str!("entry.S"));
18+
global_asm!(include_str!("entry.S"), options(att_syntax));
1919

2020
#[repr(C)]
2121
struct EntryReturn(u64, u64);

0 commit comments

Comments
 (0)