about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2016-05-16 15:41:45 +0200
committerAndrea Canciani <ranma42@gmail.com>2016-05-16 15:41:45 +0200
commit4ec1f8de418a96dc2c5f3e70e4e344fc307569e3 (patch)
tree481d3321f7f59d8dc65a1def689e806880cbd5d9 /src/libcore/num
parent88afeb9cba0f14c76f8455a881a8ef11ea8fb5f1 (diff)
downloadrust-4ec1f8de418a96dc2c5f3e70e4e344fc307569e3.tar.gz
rust-4ec1f8de418a96dc2c5f3e70e4e344fc307569e3.zip
Fix `asm!` blocks
The `volatile` modifier was incorrectly written outside of the `asm!`
blocks.
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/dec2flt/algorithm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/num/dec2flt/algorithm.rs b/src/libcore/num/dec2flt/algorithm.rs
index 35a613ef5fc..c7af46a1e4f 100644
--- a/src/libcore/num/dec2flt/algorithm.rs
+++ b/src/libcore/num/dec2flt/algorithm.rs
@@ -70,7 +70,7 @@ mod fpu_precision {
     pub struct FPUControlWord(u16);
 
     fn set_cw(cw: u16) {
-        unsafe { asm!("fldcw $0" :: "m" (cw)) :: "volatile" }
+        unsafe { asm!("fldcw $0" :: "m" (cw) :: "volatile") }
     }
 
     /// Set the precision field of the FPU to `T` and return a `FPUControlWord`
@@ -86,7 +86,7 @@ mod fpu_precision {
 
         // Get the original value of the control word to restore it later, when the
         // `FPUControlWord` structure is dropped
-        unsafe { asm!("fnstcw $0" : "=*m" (&cw)) ::: "volatile" }
+        unsafe { asm!("fnstcw $0" : "=*m" (&cw) ::: "volatile") }
 
         // Set the control word to the desired precision. This is achieved by masking away the old
         // precision (bits 8 and 9, 0x300) and replacing it with the precision flag computed above.