forked from LuaJIT/LuaJIT
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial e2k support. #7
Merged
Merged
+11,214
−1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Basic support, but can't publish codegen itself (dasm_e2k.lua). Will add generated code later, and make rules to use it. vm_e2k.dasc under development yet, its tested, but should be omptimized more and more... No jit support yet. Recommended flags for build: XCFLAGS="-DLUAJIT_UNWIND_EXTERNAL -fexceptions -O3"
I cannot publish NDA code with opcodes and instruction coding for e2k architecture, so just use pregenerated code.
This is final version, I think. The architecture of LuaJIT is adverse for e2k. Random access to BC templates and all operands from memory slows down compiler. To make optimal lua jit compiler for e2k, should be done template-chain architecture and most data in registers with JIT planning of operations and codegen. But within the framework of this project, it is not advisable
Rare errors detected by EntityFX-Bench: incorrect read of MULTRES, and incorrect branch in string_sub fastcall.
found in shaders\gl\accum_volumetric_nomsaa.s shader from openxray engine.
Incorrect shifting results, when more results expected (garbage instead of nill). (bug from openxray).
Incorrect parameter for lj_tab_getinth call and incorrect logic block of resulting value, found in lua-Harness/suite/test_lua/015-forlist.t
incorrect branch cos of too late preload of PC, found in lua-Harness/suite/test_lua/108-userdata.t
incorrect logical operations near fallback case, found in lua-Harness/suite/test_lua/301-basic.t
error cos of incorrect reusing registers and the bitness of data , found in lua-Harness/suite/test_lua/306-table.t
incorrect planning of operations, sequential commands in single wide instruction.
We should reserve 64 bytes in stack frames for parameters in registers. Our api doesnot use it, but external code, may write or read from this space. Bug found on https://github.com/ThePhD/sol2 during work on openmw.
It appeared in iset2, currently it is generic, so we can skip it and use single instruction instead of original code.
This reverts commit de5568e.
Thanks to @Krodinn and RvP
That's unreadable!
This is a workaround for compatibility with scripts written for LuaJIT 1.1.x
BuildVM were generating invalid headers
…backport from v2.1)
…fore return (backport from v2.1)
… relocations; Minor E2K dynasm improvments (backported from v2.1)
Xottab-DUTY
approved these changes
Mar 9, 2025
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello there.
Interpreter part for e2k(elbrus) architecture. JIT is not implemented yet. Backported to the openxray's luajit state. Can be built by LCC (Elbrus C Compiler). Additional information and remote access here: https://dev.mcst.ru/
Prefered configuration options for LCC:
XCFLAGS="-O3 -fexceptions"