@@ -542,10 +542,10 @@ mod hw {
542
542
} else {
543
543
asm ! (
544
544
// Dummy `cpuid(0)` to serialize instruction execution.
545
- "xor % eax, % eax" , // Intel syntax: "xor eax, eax"
545
+ "xor eax, eax" ,
546
546
"cpuid" ,
547
547
548
- "mov {rdpmc_ecx:e}, % ecx" , // Intel syntax: "mov ecx, {rdpmc_ecx:e}"
548
+ "mov ecx, {rdpmc_ecx:e}" ,
549
549
"rdpmc" ,
550
550
rdpmc_ecx = in( reg) reg_idx,
551
551
out( "eax" ) lo,
@@ -556,12 +556,6 @@ mod hw {
556
556
out( "ecx" ) _,
557
557
558
558
options( nostack) ,
559
-
560
- // HACK(eddyb) LLVM 9 and older do not support modifiers
561
- // in Intel syntax inline asm; whenever Rust minimum LLVM
562
- // version becomes LLVM 10, remove and replace above
563
- // instructions with Intel syntax version (from comments).
564
- options( att_syntax) ,
565
559
) ;
566
560
}
567
561
}
@@ -579,14 +573,14 @@ mod hw {
579
573
unsafe {
580
574
asm ! (
581
575
// Dummy `cpuid(0)` to serialize instruction execution.
582
- "xor % eax, % eax" , // Intel syntax: "xor eax, eax"
576
+ "xor eax, eax" ,
583
577
"cpuid" ,
584
578
585
- "mov {a_rdpmc_ecx:e}, % ecx" , // Intel syntax: "mov ecx, {a_rdpmc_ecx:e}"
579
+ "mov ecx, {a_rdpmc_ecx:e}" ,
586
580
"rdpmc" ,
587
- "mov %eax, {a_rdpmc_eax:e}" , // Intel syntax: "mov {a_rdpmc_eax:e}, eax"
588
- "mov %edx, {a_rdpmc_edx:e}" , // Intel syntax: "mov {a_rdpmc_edx:e}, edx"
589
- "mov {b_rdpmc_ecx:e}, % ecx" , // Intel syntax: "mov ecx, {b_rdpmc_ecx:e}"
581
+ "mov {a_rdpmc_eax:e}, eax" ,
582
+ "mov {a_rdpmc_edx:e}, edx" ,
583
+ "mov ecx, {b_rdpmc_ecx:e}" ,
590
584
"rdpmc" ,
591
585
a_rdpmc_ecx = in( reg) a_reg_idx,
592
586
a_rdpmc_eax = out( reg) a_lo,
@@ -600,12 +594,6 @@ mod hw {
600
594
out( "ecx" ) _,
601
595
602
596
options( nostack) ,
603
-
604
- // HACK(eddyb) LLVM 9 and older do not support modifiers
605
- // in Intel syntax inline asm; whenever Rust minimum LLVM
606
- // version becomes LLVM 10, remove and replace above
607
- // instructions with Intel syntax version (from comments).
608
- options( att_syntax) ,
609
597
) ;
610
598
}
611
599
(
@@ -815,17 +803,10 @@ mod hw {
815
803
let mut _tmp: u64 = 0 ;
816
804
unsafe {
817
805
asm ! (
818
- // Intel syntax: "lock xadd [{atomic}], {tmp}"
819
- "lock xadd {tmp}, ({atomic})" ,
806
+ "lock xadd qword ptr [{atomic}], {tmp}" ,
820
807
821
808
atomic = in( reg) & mut atomic,
822
809
tmp = inout( reg) _tmp,
823
-
824
- // HACK(eddyb) LLVM 9 and older do not support modifiers
825
- // in Intel syntax inline asm; whenever Rust minimum LLVM
826
- // version becomes LLVM 10, remove and replace above
827
- // instructions with Intel syntax version (from comments).
828
- options( att_syntax) ,
829
810
) ;
830
811
}
831
812
0 commit comments