aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/loongarch.h
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2022-12-01 14:34:10 +0800
committerliuzhensong <liuzhensong@loongson.cn>2023-05-30 19:56:40 +0800
commit57a930e3bfe4b2c7fd6463ed39311e1938513138 (patch)
tree220687a30b5c57cbc3283bae2e189ea628e44ce3 /include/opcode/loongarch.h
parent7b9e7db08340cb3934a5fa95503fda523e0917b7 (diff)
downloadgdb-57a930e3bfe4b2c7fd6463ed39311e1938513138.zip
gdb-57a930e3bfe4b2c7fd6463ed39311e1938513138.tar.gz
gdb-57a930e3bfe4b2c7fd6463ed39311e1938513138.tar.bz2
LoongArch: include: Add support for linker relaxation.
Add relocs and gas LARCH_opts.relax option. include/ChangeLog: * elf/loongarch.h: Add relocs. * opcode/loongarch.h: Add LARCH_opts.relax and macro LARCH_NOP.
Diffstat (limited to 'include/opcode/loongarch.h')
-rw-r--r--include/opcode/loongarch.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/opcode/loongarch.h b/include/opcode/loongarch.h
index 548732e..004bb65 100644
--- a/include/opcode/loongarch.h
+++ b/include/opcode/loongarch.h
@@ -28,6 +28,8 @@ extern "C"
{
#endif
+ #define LARCH_NOP 0x03400000
+
typedef uint32_t insn_t;
struct loongarch_opcode
@@ -228,6 +230,7 @@ dec2 : [1-9][0-9]?
#define ase_gpcr isa.use_la_global_with_pcrel
#define ase_gabs isa.use_la_global_with_abs
+ int relax;
} LARCH_opts;
extern size_t loongarch_insn_length (insn_t insn);