File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,10 @@ impl IdtrBase {
1313 limit : 0 ,
1414 base_addr : 0 ,
1515 } ;
16- llvm_asm ! ( "sidt ($0)"
17- :
18- : "r" ( & mut info)
19- : "memory"
20- : "volatile" ) ;
16+ asm ! (
17+ "sidt fword ptr [{0}]" ,
18+ in( reg) & mut info
19+ ) ;
2120 info. base_addr
2221 }
2322 }
@@ -35,11 +34,10 @@ impl GdtrBase {
3534 pub fn read ( ) -> u64 {
3635 unsafe {
3736 let mut info = GdtInfo { size : 0 , offset : 0 } ;
38- llvm_asm ! ( "sgdtq ($0)"
39- :
40- : "r" ( & mut info)
41- : "memory"
42- : "volatile" ) ;
37+ asm ! (
38+ "sgdt fword ptr [{0}]" ,
39+ in( reg) & mut info
40+ ) ;
4341 info. offset
4442 }
4543 }
Original file line number Diff line number Diff line change @@ -384,7 +384,8 @@ pub fn busy_wait(duration: core::time::Duration) {
384384 while now ( ) < start + duration {
385385 unsafe {
386386 // Relax the cpu
387- llvm_asm ! ( "rep; nop" :: : "memory" ) ;
387+ //llvm_asm!("rep; nop" ::: "memory");
388+ asm ! ( "rep" , "nop" ) ;
388389 }
389390 }
390391}
You can’t perform that action at this time.
0 commit comments