diff options
author | 2020-04-29 11:37:00 -0700 | |
---|---|---|
committer | 2020-04-29 11:37:00 -0700 | |
commit | ccb5aa91dc569f29764ce71efca8a1e1fe69f1e0 (patch) | |
tree | 5362c5022a401db01045ac11804033da6874be81 | |
parent | 7d46ab50a41dbbc3fa341d1cc4de05c0d474355e (diff) | |
download | rust-x86-ccb5aa91dc569f29764ce71efca8a1e1fe69f1e0.tar.gz rust-x86-ccb5aa91dc569f29764ce71efca8a1e1fe69f1e0.tar.zst rust-x86-ccb5aa91dc569f29764ce71efca8a1e1fe69f1e0.zip |
Fix 32-bit build.
-rw-r--r-- | src/bits64/segmentation.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bits64/segmentation.rs b/src/bits64/segmentation.rs index 1d67bf5..b5a4c87 100644 --- a/src/bits64/segmentation.rs +++ b/src/bits64/segmentation.rs @@ -177,6 +177,7 @@ pub unsafe fn rdfsbase() -> u64 { } /// "Dereferences" the fs register at offset 0. +#[cfg(target_arch = "x86_64")] pub unsafe fn fs_deref() -> u64 { let fs: u64; llvm_asm!("movq %fs:0x0, $0" : "=r" (fs) ); @@ -184,6 +185,7 @@ pub unsafe fn fs_deref() -> u64 { } /// "Dereferences" the gs register at offset 0. +#[cfg(target_arch = "x86_64")] pub unsafe fn gs_deref() -> u64 { let gs: u64; llvm_asm!("movq %gs:0x0, $0" : "=r" (gs) ); |