mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
Enable vla_test-run on all targets
Fix gen_vla_sp_save/gen_vla_sp_restore in riscv64-gen.c
This commit is contained in:
parent
657262c7e5
commit
ac9eeea1d5
@ -1382,12 +1382,24 @@ ST_FUNC void ggoto(void)
|
||||
|
||||
ST_FUNC void gen_vla_sp_save(int addr)
|
||||
{
|
||||
ES(0x23, 3, 8, 2, addr); // sd sp, fc(s0)
|
||||
if (((unsigned)addr + (1 << 11)) >> 12) {
|
||||
o(0x37 | (5 << 7) | ((0x800 + addr) & 0xfffff000)); //lui t0,upper(addr)
|
||||
ER(0x33, 0, 5, 5, 8, 0); // add t0, t0, s0
|
||||
ES(0x23, 3, 5, 2, (int)addr << 20 >> 20); // sd sp, fc(t0)
|
||||
}
|
||||
else
|
||||
ES(0x23, 3, 8, 2, addr); // sd sp, fc(s0)
|
||||
}
|
||||
|
||||
ST_FUNC void gen_vla_sp_restore(int addr)
|
||||
{
|
||||
EI(0x03, 3, 2, 8, addr); // ld sp, fc(s0)
|
||||
if (((unsigned)addr + (1 << 11)) >> 12) {
|
||||
o(0x37 | (5 << 7) | ((0x800 + addr) & 0xfffff000)); //lui t0,upper(addr)
|
||||
ER(0x33, 0, 5, 5, 8, 0); // add t0, t0, s0
|
||||
EI(0x03, 3, 2, 5, (int)addr << 20 >> 20); // ld sp, fc(t0)
|
||||
}
|
||||
else
|
||||
EI(0x03, 3, 2, 8, addr); // ld sp, fc(s0)
|
||||
}
|
||||
|
||||
ST_FUNC void gen_vla_alloc(CType *type, int align)
|
||||
|
@ -32,9 +32,6 @@ endif
|
||||
ifeq ($(CONFIG_dll),no)
|
||||
TESTS := $(filter-out dlltest, $(TESTS))
|
||||
endif
|
||||
ifeq (,$(filter arm64 i386 x86_64,$(ARCH)))
|
||||
TESTS := $(filter-out vla_test-run,$(TESTS))
|
||||
endif
|
||||
ifeq (-$(CONFIG_arm_eabi)-$(CONFIG_arm_vfp)-,-yes--)
|
||||
TESTS := $(filter-out test3 test1b,$(TESTS))
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user