[PATCH 5/7] opcodes: LoongArch: add "ret" instruction to reduce typing

WANG Xuerui i.swmail@xen0n.name
Mon Oct 25 03:12:01 GMT 2021


From: WANG Xuerui <git@xen0n.name>

2021-10-25  WANG Xuerui <git@xen0n.name>

opcodes/
        * loongarch-opc.c: Add "ret" to loongarch_jmp_opcodes.
---
 opcodes/loongarch-opc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/opcodes/loongarch-opc.c b/opcodes/loongarch-opc.c
index 1f8f9227a1f..687bfd776c5 100644
--- a/opcodes/loongarch-opc.c
+++ b/opcodes/loongarch-opc.c
@@ -770,6 +770,7 @@ static struct loongarch_opcode loongarch_jmp_opcodes[] =
   { 0x0,	0x0,		"bltu",		"r,r,la",			"bgtu %2,%1,%%pcrel(%3)",	0, 0, 0 },
   { 0x0,	0x0,		"bltz",		"r,la",				"bgt $r0,%1,%%pcrel(%2)",	0, 0, 0 },
   { 0x0,	0x0,		"jr",		"r",				"jirl $r0,%1,0",		0, 0, 0 },
+  { 0x0,	0x0,		"ret",		"",				"jirl $r0,$r1,0",		0, 0, 0 },
 
   { 0 } /* Terminate the list.  */
 };
-- 
2.33.1



More information about the Binutils mailing list