18#include "gdbsupport/common-defs.h"
21#include <unordered_map>
30#define STATIC_IN_GDB static
41 std::string arch_name =
"loongarch";
43 if (features.
xlen == 4)
44 arch_name.append (
"32");
45 else if (features.
xlen == 8)
46 arch_name.append (
"64");
49 arch_name.append (
"f");
51 arch_name.append (
"d");
58 if (features.
xlen == 4)
60 else if (features.
xlen == 8)
77 return features.hash ();
95 return it->second.get ();
static int create_feature_loongarch_base32(struct target_desc *result, long regnum)
static int create_feature_loongarch_base64(struct target_desc *result, long regnum)
static int create_feature_loongarch_fpu(struct target_desc *result, long regnum)
static std::unordered_map< loongarch_gdbarch_features, const target_desc_up, loongarch_gdbarch_features_hasher > loongarch_tdesc_cache
const target_desc * loongarch_lookup_target_description(const struct loongarch_gdbarch_features features)
STATIC_IN_GDB target_desc_up loongarch_create_target_description(const struct loongarch_gdbarch_features features)
std::size_t operator()(const loongarch_gdbarch_features &features) const noexcept
void set_tdesc_architecture(struct target_desc *target_desc, const char *name)
target_desc_up allocate_target_description(void)