History

Enable vla_test-run on all targets

Fix gen_vla_sp_save/gen_vla_sp_restore in riscv64-gen.c

herman ten brugge committed 3 years ago

Commit ac9eeea1 parent 657262c2 files · +14 −5Browse files

Unified · Split

2 files
  1. riscv64-gen.c +14 −2
  2. tests/Makefile +0 −3
riscv64-gen.c+14−2
@@ -1382,12 +1382,24 @@ ST_FUNC void ggoto(void) · 1381 unmodified lines
1382 1382
1383ST_FUNC void gen_vla_sp_save(int addr)1383ST_FUNC void gen_vla_sp_save(int addr)
1384{1384{
1385 ES(0x23, 3, 8, 2, addr); // sd sp, fc(s0)1385 if (((unsigned)addr + (1 << 11)) >> 12) {
1386 o(0x37 | (5 << 7) | ((0x800 + addr) & 0xfffff000)); //lui t0,upper(addr)
1387 ER(0x33, 0, 5, 5, 8, 0); // add t0, t0, s0
1388 ES(0x23, 3, 5, 2, (int)addr << 20 >> 20); // sd sp, fc(t0)
1389 }
1390 else
1391 ES(0x23, 3, 8, 2, addr); // sd sp, fc(s0)
1386}1392}
1387 1393
1388ST_FUNC void gen_vla_sp_restore(int addr)1394ST_FUNC void gen_vla_sp_restore(int addr)
1389{1395{
1390 EI(0x03, 3, 2, 8, addr); // ld sp, fc(s0)1396 if (((unsigned)addr + (1 << 11)) >> 12) {
1397 o(0x37 | (5 << 7) | ((0x800 + addr) & 0xfffff000)); //lui t0,upper(addr)
1398 ER(0x33, 0, 5, 5, 8, 0); // add t0, t0, s0
1399 EI(0x03, 3, 2, 5, (int)addr << 20 >> 20); // ld sp, fc(t0)
1400 }
1401 else
1402 EI(0x03, 3, 2, 8, addr); // ld sp, fc(s0)
1391}1403}
1392 1404
1393ST_FUNC void gen_vla_alloc(CType *type, int align)1405ST_FUNC void gen_vla_alloc(CType *type, int align)
tests/Makefile+0−3
@@ -32,9 +32,6 @@ endif · 31 unmodified lines
32ifeq ($(CONFIG_dll),no)32ifeq ($(CONFIG_dll),no)
33 TESTS := $(filter-out dlltest, $(TESTS))33 TESTS := $(filter-out dlltest, $(TESTS))
34endif34endif
35ifeq (,$(filter arm64 i386 x86_64,$(ARCH)))
36 TESTS := $(filter-out vla_test-run,$(TESTS))
37endif
38ifeq (-$(CONFIG_arm_eabi)-$(CONFIG_arm_vfp)-,-yes--)35ifeq (-$(CONFIG_arm_eabi)-$(CONFIG_arm_vfp)-,-yes--)
39 TESTS := $(filter-out test3 test1b,$(TESTS))36 TESTS := $(filter-out test3 test1b,$(TESTS))
40endif37endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t