[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/riscv: use .insn with operands to support the older gas



commit a771e0259457eb9373ae97f54436957ffa09a47d
Author:     Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Thu Jul 4 09:30:46 2024 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 4 09:30:46 2024 +0200

    xen/riscv: use .insn with operands to support the older gas
    
    Support for specifying "raw" insns was added only in 2.38.
    To support older version it would be better switch to .insn
    with operands.
    
    The following compilation error occurs:
      ./arch/riscv/include/asm/processor.h: Assembler messages:
      ./arch/riscv/include/asm/processor.h:70: Error: unrecognized opcode 
`0x0100000F'
    In case of the following Binutils:
      $ riscv64-linux-gnu-as --version
      GNU assembler (GNU Binutils for Debian) 2.35.2
    
    Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
 xen/arch/riscv/include/asm/processor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/riscv/include/asm/processor.h 
b/xen/arch/riscv/include/asm/processor.h
index 6846151717..3ae164c265 100644
--- a/xen/arch/riscv/include/asm/processor.h
+++ b/xen/arch/riscv/include/asm/processor.h
@@ -67,7 +67,7 @@ static inline void cpu_relax(void)
     __asm__ __volatile__ ( "pause" );
 #else
     /* Encoding of the pause instruction */
-    __asm__ __volatile__ ( ".insn 0x0100000F" );
+    __asm__ __volatile__ ( ".insn r MISC_MEM, 0, 0, x0, x0, x16" );
 #endif
 
     barrier();
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.