Skip to content

Commit

Permalink
Use llvm_asm! instead of asm!
Browse files Browse the repository at this point in the history
The asm! syntax is changing: rust-lang/rust#69171
  • Loading branch information
Amanieu authored and raoulstrackx committed Oct 13, 2020
1 parent 863b195 commit 8eb9286
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//! testing this crate.

#![cfg_attr(feature = "allocator-api", feature(allocator_api))]
#![cfg_attr(target_env = "sgx", feature(asm))]
#![cfg_attr(target_env = "sgx", feature(llvm_asm))]
#![cfg_attr(not(feature = "allocator-api"), allow(dead_code))]
#![no_std]
#![deny(missing_docs)]
Expand Down
2 changes: 1 addition & 1 deletion src/sgx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ unsafe fn rel_ptr_mut<T>(offset: u64) -> *mut T {
#[inline(always)]
fn image_base() -> u64 {
let base;
unsafe { asm!("lea IMAGE_BASE(%rip),$0":"=r"(base)) };
unsafe { llvm_asm!("lea IMAGE_BASE(%rip),$0":"=r"(base)) };
base
}

Expand Down

0 comments on commit 8eb9286

Please sign in to comment.