From 467578773fe2dfc960306f5f1bde1114bffa22a1 Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Wed, 20 May 2020 23:09:11 +0200 Subject: [PATCH] changed the green threads example to use llvm_asm due to https://github.com/rust-lang/rust/pull/69171 --- src/0_background_information.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/0_background_information.md b/src/0_background_information.md index c7cb5e5..2803326 100644 --- a/src/0_background_information.md +++ b/src/0_background_information.md @@ -148,7 +148,7 @@ A green threads example could look something like this: _**Press the expand icon in the top right corner to show the example code.**_ ```rust, edition2018 -# #![feature(asm, naked_functions)] +# #![feature(llvm_asm, naked_functions)] # use std::ptr; # # const DEFAULT_STACK_SIZE: usize = 1024 * 1024 * 2; @@ -314,7 +314,7 @@ _**Press the expand icon in the top right corner to show the example code.**_ # #[naked] # #[inline(never)] # unsafe fn switch(old: *mut ThreadContext, new: *const ThreadContext) { -# asm!(" +# llvm_asm!(" # mov %rsp, 0x00($0) # mov %r15, 0x08($0) # mov %r14, 0x10($0)