1570af302Sopenharmony_ci#ifdef __loongarch_soft_float 2570af302Sopenharmony_ci#define FP_SUFFIX "-sf" 3570af302Sopenharmony_ci#elif defined __loongarch_single_float 4570af302Sopenharmony_ci#define FP_SUFFIX "-sp" 5570af302Sopenharmony_ci#else 6570af302Sopenharmony_ci#define FP_SUFFIX "" 7570af302Sopenharmony_ci#endif 8570af302Sopenharmony_ci 9570af302Sopenharmony_ci#define LDSO_ARCH "loongarch64" FP_SUFFIX 10570af302Sopenharmony_ci 11570af302Sopenharmony_ci#define TPOFF_K 0 12570af302Sopenharmony_ci 13570af302Sopenharmony_ci#define REL_PLT R_LARCH_JUMP_SLOT 14570af302Sopenharmony_ci#define REL_COPY R_LARCH_COPY 15570af302Sopenharmony_ci#define REL_DTPMOD R_LARCH_TLS_DTPMOD64 16570af302Sopenharmony_ci#define REL_DTPOFF R_LARCH_TLS_DTPREL64 17570af302Sopenharmony_ci#define REL_TPOFF R_LARCH_TLS_TPREL64 18570af302Sopenharmony_ci#define REL_RELATIVE R_LARCH_RELATIVE 19570af302Sopenharmony_ci#define REL_SYMBOLIC R_LARCH_64 20570af302Sopenharmony_ci 21570af302Sopenharmony_ci#define CRTJMP(pc,sp) __asm__ __volatile__( \ 22570af302Sopenharmony_ci "move $sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" ) 23570af302Sopenharmony_ci 24570af302Sopenharmony_ci#define GETFUNCSYM(fp, sym, got) __asm__ ( \ 25570af302Sopenharmony_ci ".hidden " #sym "\n" \ 26570af302Sopenharmony_ci ".align 8 \n" \ 27570af302Sopenharmony_ci " la.local $t1, "#sym" \n" \ 28570af302Sopenharmony_ci " move %0, $t1 \n" \ 29570af302Sopenharmony_ci : "=r"(*(fp)) : : "memory" ) 30