Compare commits

..

3 Commits

Author SHA1 Message Date
fb8a4f7507 Fix
Some checks failed
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:Ubuntu x86_64 os:ubuntu-latest]) (push) Has been cancelled
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:Windows x86_64 os:windows-2022]) (push) Has been cancelled
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:macOS x86_64 os:macos-latest]) (push) Has been cancelled
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x86 name:Windows x86 os:windows-2022]) (push) Has been cancelled
Zig Build / build-ubuntu (ubuntu-latest) (push) Has been cancelled
Zig Build / build-macos (macos-latest) (push) Has been cancelled
2025-04-14 23:10:26 +08:00
596478d791 Fix use_lsx_instructions
Some checks are pending
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:Ubuntu x86_64 os:ubuntu-latest]) (push) Waiting to run
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:Windows x86_64 os:windows-2022]) (push) Waiting to run
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:macOS x86_64 os:macos-latest]) (push) Waiting to run
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x86 name:Windows x86 os:windows-2022]) (push) Waiting to run
Zig Build / build-ubuntu (ubuntu-latest) (push) Waiting to run
Zig Build / build-macos (macos-latest) (push) Waiting to run
2025-04-14 23:09:01 +08:00
WangLiangpu
0cd8b83f5b Squashed commit of the following:
commit 2d9587f26b
Author: WangLiangpu <wangjingpu17@mails.ucas.ac.cn>
Date:   Wed Nov 1 21:36:35 2023 +0800

    fix: fix tcg_out_dupi_vec interface conflicts

commit b957324d3d
Author: zhaodongru <zhaodongru@yeah.net>
Date:   Mon Oct 23 18:15:01 2023 +0800

    start loongarch compile

    fix: modify the code to pass compile

    add: add code for tcg_out_op, tcg_can_emit_vec_op, tcg_target_op_def to support new tcg_op

    fix: fix bugs related to epilogue and ret_addr

    fix: fix bug in qemu_ld_slow_path, the return register is wrong
2025-04-14 23:05:49 +08:00
3 changed files with 8 additions and 8 deletions

View File

@@ -815,6 +815,9 @@ struct TCGContext {
char s390x_cpu_reg_names[16][4]; // renamed from original cpu_reg_names[][] to avoid name clash with m68k
TCGv_i64 regs[16];
// loongarch
bool use_lsx_instructions;
};
static inline size_t temp_idx(TCGContext *tcg_ctx, TCGTemp *ts)

View File

@@ -97,8 +97,6 @@ typedef enum {
TCG_VEC_TMP0 = TCG_REG_V23,
} TCGReg;
extern bool use_lsx_instructions;
/* used for function call generation */
#define TCG_REG_CALL_STACK TCG_REG_SP
#define TCG_TARGET_STACK_ALIGN 16
@@ -187,10 +185,11 @@ extern bool use_lsx_instructions;
#define TCG_TARGET_HAS_mulsh_i64 1
#define TCG_TARGET_HAS_direct_jump 0
#define TCG_TARGET_HAS_qemu_ldst_i128 use_lsx_instructions
// TODO: use_lsx_instructions?
#define TCG_TARGET_HAS_qemu_ldst_i128 1
#define TCG_TARGET_HAS_v64 0
#define TCG_TARGET_HAS_v128 use_lsx_instructions
#define TCG_TARGET_HAS_v128 1
#define TCG_TARGET_HAS_v256 0
#define TCG_TARGET_HAS_not_vec 1

View File

@@ -32,8 +32,6 @@
#include "../tcg-ldst.inc.c"
#include <asm/hwcap.h>
bool use_lsx_instructions;
#ifdef CONFIG_DEBUG_TCG
static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
"zero",
@@ -2604,10 +2602,10 @@ static void tcg_target_init(TCGContext *s)
}
if (hwcap & HWCAP_LOONGARCH_LSX) {
use_lsx_instructions = 1;
s->use_lsx_instructions = 1;
}
#else
use_lsx_instructions = 1;
s->use_lsx_instructions = 1;
#endif
s->tcg_target_available_regs[TCG_TYPE_I32] = ALL_GENERAL_REGS;