[binutils-gdb] LoongArch: Add R_LARCH_TLS_LE_ADD_R relocation support for add.w

liu zhensong liuzhensong@sourceware.org
Wed Dec 10 08:08:00 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a820ec7a3fb203abd55a56a687ff41c5de0c11c4

commit a820ec7a3fb203abd55a56a687ff41c5de0c11c4
Author: mengqinggang <mengqinggang@loongson.cn>
Date:   Mon May 5 11:29:52 2025 +0800

    LoongArch: Add R_LARCH_TLS_LE_ADD_R relocation support for add.w
    
    Fix compiler error for "add.w $r12,$r12,$r2,%le_add_r(a)".

Diff:
---
 opcodes/loongarch-opc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/opcodes/loongarch-opc.c b/opcodes/loongarch-opc.c
index b443aebb477..f7d750a09e0 100644
--- a/opcodes/loongarch-opc.c
+++ b/opcodes/loongarch-opc.c
@@ -512,6 +512,7 @@ static struct loongarch_opcode loongarch_fix_opcodes[] =
   { 0x00080000, 0xfffe0000,	"bytepick.w",	"r0:5,r5:5,r10:5,u15:2",	0,			0,	0,	0 },
   { 0x000c0000, 0xfffc0000,	"bytepick.d",	"r0:5,r5:5,r10:5,u15:3",	0,			0,	0,	0 },
   { 0x00100000, 0xffff8000,	"add.w",	"r0:5,r5:5,r10:5",		0,			0,	0,	0 },
+  { 0x00100000, 0xffff8000,	"add.w",	"r0:5,r5:5,r10:5,t",		0,			0,	0,	0 },
   { 0x00108000, 0xffff8000,	"add.d",	"r0:5,r5:5,r10:5",		0,			0,	0,	0 },
   { 0x00108000, 0xffff8000,	"add.d",	"r0:5,r5:5,r10:5,t",		0,			0,	0,	0 },
   { 0x00110000, 0xffff8000,	"sub.w",	"r0:5,r5:5,r10:5",		0,			0,	0,	0 },


More information about the Binutils-cvs mailing list