Skip to content

Commit 4ec1f8d

Browse files
committed
Fix asm! blocks
The `volatile` modifier was incorrectly written outside of the `asm!` blocks.
1 parent 88afeb9 commit 4ec1f8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/num/dec2flt/algorithm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ mod fpu_precision {
7070
pub struct FPUControlWord(u16);
7171

7272
fn set_cw(cw: u16) {
73-
unsafe { asm!("fldcw $0" :: "m" (cw)) :: "volatile" }
73+
unsafe { asm!("fldcw $0" :: "m" (cw) :: "volatile") }
7474
}
7575

7676
/// Set the precision field of the FPU to `T` and return a `FPUControlWord`
@@ -86,7 +86,7 @@ mod fpu_precision {
8686

8787
// Get the original value of the control word to restore it later, when the
8888
// `FPUControlWord` structure is dropped
89-
unsafe { asm!("fnstcw $0" : "=*m" (&cw)) ::: "volatile" }
89+
unsafe { asm!("fnstcw $0" : "=*m" (&cw) ::: "volatile") }
9090

9191
// Set the control word to the desired precision. This is achieved by masking away the old
9292
// precision (bits 8 and 9, 0x300) and replacing it with the precision flag computed above.

0 commit comments

Comments
 (0)