ruyisdk / LuaJIT

Porting LuaJIT to RISC-V
http://luajit.org
Other
0 stars 0 forks source link

LuaJIT no longer enable JIT for XThead #1

Open cwt opened 3 weeks ago

cwt commented 3 weeks ago

SoC: Lichee Pi 4A OS: Arch Linux Kernel: 5.10.113 from https://github.com/cwt-lpi4a/linux-cwt-thead-lpi4a/releases/tag/r277.f6b3a51da-1 Compiler: gcc version 14.2.1 20240910 (GCC) Build Command:

make amalg \
  PREFIX=/usr \
  BUILDMODE=dynamic \
  TARGET_STRIP=" @:" \
  CC="gcc -march=rv64gc_zfh_xtheadba_xtheadbb_xtheadbs_xtheadcmo\
_xtheadcondmov_xtheadfmemidx_xtheadint_xtheadmac_xtheadmemidx\
_xtheadmempair_xtheadsync_xtheadvector -mtune=generic-ooo \
        -mabi=lp64d -O2 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection"

The LuaJIT from commit 1d853a77 on branch v2.1-riscv64 doesn't enable JIT for XThead:

$ luajit
LuaJIT 2.1.1730654311 -- Copyright (C) 2005-2023 Mike Pall. https://luajit.org/
JIT: ON RVC fold cse dce fwd dse narrow loop abc sink fuse
>

However, my old built from commit c8d97372 does:

$ luajit
LuaJIT 2.1.1724137837 -- Copyright (C) 2005-2023 Mike Pall. https://luajit.org/
JIT: ON RVC XThead fold cse dce fwd dse narrow loop abc sink fuse
>

By the way, commit c8d97372 is no longer part of any branch. I guess it belonged to a development branch or something. So it's hard for me to find what changed between these two commits.

cwt commented 3 weeks ago

I just download the archive of that commit and do the diff. May be this is why XThead it not working (yet?) Screenshot from 2024-11-04 16-42-10