https://github.com/LuaJIT/LuaJIT/pull/1267 Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} LuaJIT / LuaJIT Public * Notifications You must be signed in to change notification settings * Fork 951 * Star 4.6k * Code * Issues 47 * Pull requests 14 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights 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. Sign up for GitHub 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 Jump to bottom Add support for RISC-V 64 Linux #1267 Open infiWang wants to merge 21 commits into LuaJIT:v2.1 base: v2.1 Choose a base branch [ ] Branches Tags Could not load branches Branch not found: {{ refName }} Loading {{ refName }} default Could not load tags Nothing to show {{ refName }} default Loading Are you sure you want to change the base? Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated. Loading Change base from plctlab:v2.1-riscv64-pr Open Add support for RISC-V 64 Linux #1267 infiWang wants to merge 21 commits into LuaJIT:v2.1 from plctlab: v2.1-riscv64-pr +10,736 -9 Conversation 1 Commits 21 Checks 0 Files changed 29 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 Show hidden characters infiWang Copy link @infiWang infiWang commented Sep 8, 2024 This patchset adds full interpreter and backend support for RISC-V 64 G(IMAFD) with LP64D ABI on Linux, with compile-time/runtime extension support for RVC, Zba, Zbb, Zicond, XTheadBa, XTheadBb, XTheadCondMov and XTheadMac. Thanks to Mike Pall, LuaJIT is well renowned for its accomplishments and performance in JIT compilers. As an undergraduate interested in RISC-V and compilers, I'm honored to have a chance to contribute to a production compiler. I also want to express my gratitude for the internship opportunity provided by PLCT Lab, ISCAS, which enabled me to this endeavor. I would greatly value a review of my patch to catch my misses and for a better polish; Your feedback would be invaluable. Thank you for your time and consideration. Sorry, something went wrong. 2 moberer and YesserLab reacted with thumbs up emoji 4 elimisteve, cyyself, luckasRanarison, and YesserLab reacted with laugh emoji [?] 12 ericoporto, mangelajo, cyyself, miklelappo, ghishadow, Vam-Jam, svercl, edubart, imarko, mtve, and 2 more reacted with heart emoji 31 SpriteOvO, benz0li, fwsGonzo, mr-c, Xeonacid, GhostFrankWu, fgaz, tebowy, camel-cdr, debugloop, and 21 more reacted with rocket emoji All reactions * 2 reactions * 4 reactions * [?] 12 reactions * 31 reactions infiWang added 21 commits September 8, 2024 17:11 @infiWang riscv(support): add RISC-V 64 arch base definition 60c8585 @infiWang riscv(dynasm): add RISC-V support 87568b0 @infiWang riscv(interp): add register definition 6641acf @infiWang riscv(interp): add frame definition 592ada8 @infiWang riscv(interp): add helper macros and typedefs 1b7ed4c @infiWang riscv(interp): add base assembly interpreter VM ad3cee4 @infiWang riscv(support): add target definition b1e22a2 @infiWang riscv(ffi): add call convention and support framework 2840e1c @infiWang riscv(support): add extension detection d2ba467 @infiWang riscv(jit): add insn emitter 7358563 @infiWang riscv(jit): add IR assembler 695bd71 @infiWang riscv(interp): add VM builder support 35b117d @infiWang riscv(misc): add bytecode listing support ea94870 @infiWang riscv(jit): add hooks in interpreter 574da8b @infiWang riscv(interp): add DWARF info b594496 @infiWang riscv(jit): add GDBJIT support 7062a62 @infiWang riscv(support,linux): add Linux specfic icache sync codepath 74cdc7d @infiWang riscv(support,linux): make mremap() non-moving due to VA space woes ff099ca @infiWang riscv(misc): add disassmbler support 9d3d70e @infiWang riscv(misc): add support in Makefile 5692295 @infiWang riscv(support,linux): use HWPROBE for ISE detection ... 69d4d75 Current SIGILL handler appears to have weird issues with libluajit on some platform. Considering 6.6 kernel is becoming more common, switch to HWPROBE for better compatibility. @infiWang infiWang mentioned this pull request Sep 8, 2024 Add support for RISC-V #628 Open @fwsGonzo Copy link fwsGonzo commented Sep 8, 2024 * edited Loading Works! https://gist.github.com/fwsGonzo/ b8b193309bdca18291957c6080fd8219 All reactions Sorry, something went wrong. Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Reviewers No reviews Assignees No one assigned Labels None yet Projects None yet Milestone No milestone Development Successfully merging this pull request may close these issues. None yet 2 participants @infiWang @fwsGonzo 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. Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.