binutils-gdb/gdb/features/loongarch/lbt.c
Feiyang Chen e4d74c01e7 gdb: LoongArch: Add LBT extension support
Loongson Binary Translation (LBT) is used to accelerate binary
translation, which contains 4 scratch registers (scr0 to scr3),
x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop). This
patch support gdb to fetch/store these registers.

Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> #  Framework
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>   #  Detail Optimizes
Signed-off-by: Hui Li <lihui@loongson.cn>             #  Error Fixes
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
2024-02-06 18:40:19 +08:00

20 lines
765 B
C

/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
Original: lbt.xml */
#include "gdbsupport/tdesc.h"
static int
create_feature_loongarch_lbt (struct target_desc *result, long regnum)
{
struct tdesc_feature *feature;
feature = tdesc_create_feature (result, "org.gnu.gdb.loongarch.lbt");
tdesc_create_reg (feature, "scr0", regnum++, 1, "lbt", 64, "uint64");
tdesc_create_reg (feature, "scr1", regnum++, 1, "lbt", 64, "uint64");
tdesc_create_reg (feature, "scr2", regnum++, 1, "lbt", 64, "uint64");
tdesc_create_reg (feature, "scr3", regnum++, 1, "lbt", 64, "uint64");
tdesc_create_reg (feature, "eflags", regnum++, 1, "lbt", 32, "uint32");
tdesc_create_reg (feature, "ftop", regnum++, 1, "lbt", 32, "uint32");
return regnum;
}