@@ -368,7 +368,7 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst,
368368\*----------------------------------------------------------------------------*/
369369#if defined(__i386__ ) || (defined(__x86_64__ ) && !defined(__arm64ec__ ))
370370static __inline__ void __DEFAULT_FN_ATTRS __halt (void ) {
371- __asm__ volatile ("hlt" );
371+ __asm__ __volatile__ ("hlt" );
372372}
373373
374374static __inline__ unsigned char __inbyte (unsigned short port ) {
@@ -391,20 +391,20 @@ static __inline__ unsigned long __indword(unsigned short port) {
391391
392392static inline void __inbytestring (unsigned short port , unsigned char * buffer , unsigned long count )
393393{
394- asm volatile ("rep insb" : "+D" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
394+ __asm__ __volatile__ ("rep insb" : "+D" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
395395}
396396
397397static inline void __inwordstring (unsigned short port , unsigned short * buffer , unsigned long count )
398398{
399- asm volatile ("rep insw" : "+D" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
399+ __asm__ __volatile__ ("rep insw" : "+D" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
400400}
401401
402402static inline void __indwordstring (unsigned short port , unsigned long * buffer , unsigned long count )
403403{
404404 unsigned long * word_buffer = (unsigned long * )buffer ;
405405 unsigned long word_count = count * 2 ; // Each double word is 2 words
406406
407- asm volatile ("rep insw" : "+D" (word_buffer ), "+c" (word_count ) : "d" (port ) : "memory" );
407+ __asm__ __volatile__ ("rep insw" : "+D" (word_buffer ), "+c" (word_count ) : "d" (port ) : "memory" );
408408}
409409
410410static __inline__ void __outbyte (unsigned short port , unsigned char data ) {
@@ -421,20 +421,20 @@ static __inline__ void __outdword(unsigned short port, unsigned long data) {
421421
422422static inline void __outbytestring (unsigned short port , unsigned char * buffer , unsigned long count )
423423{
424- asm volatile ("rep outsb" : "+S" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
424+ __asm__ __volatile__ ("rep outsb" : "+S" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
425425}
426426
427427static inline void __outwordstring (unsigned short port , unsigned short * buffer , unsigned long count )
428428{
429- asm volatile ("rep outsw" : "+S" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
429+ __asm__ __volatile__ ("rep outsw" : "+S" (buffer ), "+c" (count ) : "d" (port ) : "memory" );
430430}
431431
432432static inline void __outdwordstring (unsigned short port , unsigned long * buffer , unsigned long count )
433433{
434434 unsigned long * word_buffer = (unsigned long * )buffer ;
435435 unsigned long word_count = count * 2 ; // Each double word is 2 words
436436
437- asm volatile ("rep outsw" : "+S" (word_buffer ), "+c" (word_count ) : "d" (port ) : "memory" );
437+ __asm__ __volatile__ ("rep outsw" : "+S" (word_buffer ), "+c" (word_count ) : "d" (port ) : "memory" );
438438}
439439
440440static __inline__ unsigned __int64 __readpmc (unsigned long __A ) {
@@ -445,7 +445,7 @@ static __inline__ unsigned __int64 __readpmc(unsigned long __A) {
445445
446446#if defined(__i386__ ) || defined(__x86_64__ ) || defined(__aarch64__ )
447447static __inline__ void __DEFAULT_FN_ATTRS __nop (void ) {
448- __asm__ volatile ("nop" );
448+ __asm__ __volatile__ ("nop" );
449449}
450450#endif
451451
@@ -627,13 +627,13 @@ void __cdecl __prefetch(const void *);
627627static __inline__ void __DEFAULT_FN_ATTRS
628628_disable (void )
629629{
630- asm volatile ("msr DAIFSet, #2" );
630+ __asm__ __volatile__ ("msr DAIFSet, #2" );
631631}
632632
633633static __inline__ void __DEFAULT_FN_ATTRS
634634_enable (void )
635635{
636- asm volatile ("msr DAIFClr, #2" );
636+ __asm__ __volatile__ ("msr DAIFClr, #2" );
637637}
638638
639639static __inline__ unsigned __int32 __DEFAULT_FN_ATTRS
@@ -655,9 +655,9 @@ __stlr64(unsigned __int64 volatile * _Target, unsigned __int64 _Value)
655655static __inline__ void * __DEFAULT_FN_ATTRS
656656__xpaci (void * _Pointer )
657657{
658- register void * __lr asm ("lr" ) = _Pointer ;
658+ register void * __lr __asm__ ("lr" ) = _Pointer ;
659659
660- asm volatile ("xpaclri" : "+r" (__lr ));
660+ __asm__ __volatile__ ("xpaclri" : "+r" (__lr ));
661661 return __lr ;
662662}
663663
@@ -683,7 +683,7 @@ __readmsr(unsigned long __register) {
683683
684684static __inline__ void __DEFAULT_FN_ATTRS
685685__writemsr (unsigned long __register , unsigned __int64 __value ) {
686- asm volatile ("wrmsr" : : "d" ((unsigned long )(__value >> 32 )), "a" ((unsigned long )__value ), "c" (__register ));
686+ __asm__ __volatile__ ("wrmsr" : : "d" ((unsigned long )(__value >> 32 )), "a" ((unsigned long )__value ), "c" (__register ));
687687}
688688
689689static __inline__ unsigned __LPTRINT_TYPE__ __DEFAULT_FN_ATTRS __readcr0 (void ) {
@@ -738,27 +738,27 @@ static __inline__ unsigned __LPTRINT_TYPE__ __DEFAULT_FN_ATTRS __readcr8(void) {
738738
739739static __inline__ void __DEFAULT_FN_ATTRS
740740__writecr0 (unsigned __INTPTR_TYPE__ __cr0_val ) {
741- __asm__ ("mov {%0, %%cr0|cr0, %0}" : : "r" (__cr0_val ) : "memory" );
741+ __asm__ __volatile__ ("mov {%0, %%cr0|cr0, %0}" : : "r" (__cr0_val ) : "memory" );
742742}
743743
744744static __inline__ void __DEFAULT_FN_ATTRS
745745__writecr2 (unsigned __INTPTR_TYPE__ __cr2_val ) {
746- __asm__ ("mov {%0, %%cr2|cr2, %0}" : : "r" (__cr2_val ) : "memory" );
746+ __asm__ __volatile__ ("mov {%0, %%cr2|cr2, %0}" : : "r" (__cr2_val ) : "memory" );
747747}
748748
749749static __inline__ void __DEFAULT_FN_ATTRS
750750__writecr3 (unsigned __INTPTR_TYPE__ __cr3_val ) {
751- __asm__ ("mov {%0, %%cr3|cr3, %0}" : : "r" (__cr3_val ) : "memory" );
751+ __asm__ __volatile__ ("mov {%0, %%cr3|cr3, %0}" : : "r" (__cr3_val ) : "memory" );
752752}
753753
754754static __inline__ void __DEFAULT_FN_ATTRS
755755__writecr4 (unsigned __INTPTR_TYPE__ __cr4_val ) {
756- __asm__ ("mov {%0, %%cr4|cr4, %0}" : : "r" (__cr4_val ) : "memory" );
756+ __asm__ __volatile__ ("mov {%0, %%cr4|cr4, %0}" : : "r" (__cr4_val ) : "memory" );
757757}
758758
759759static __inline__ void __DEFAULT_FN_ATTRS
760760__writecr8 (unsigned __INTPTR_TYPE__ __cr8_val ) {
761- __asm__ ("mov {%0, %%cr8|cr8, %0}" : : "r" (__cr8_val ) : "memory" );
761+ __asm__ __volatile__ ("mov {%0, %%cr8|cr8, %0}" : : "r" (__cr8_val ) : "memory" );
762762}
763763
764764static __inline__ void __lidt (void * source ) {
@@ -770,11 +770,11 @@ static __inline__ void __sidt(void *source) {
770770}
771771
772772static __inline__ void _enable (void ) {
773- __asm__ volatile ("sti" );
773+ __asm__ __volatile__ ("sti" );
774774}
775775
776776static __inline__ void _disable (void ) {
777- __asm__ volatile ("cli" );
777+ __asm__ __volatile__ ("cli" );
778778}
779779
780780static __inline__ void _clac (void ) {
@@ -786,7 +786,7 @@ static __inline__ void _stac(void) {
786786}
787787
788788static __inline__ void __invlpg (void * va ) {
789- asm volatile ("invlpg (%0)" : : "r" (va ) : "memory" );
789+ __asm__ __volatile__ ("invlpg (%0)" : : "r" (va ) : "memory" );
790790}
791791
792792#endif
0 commit comments