April has been a busy month for the PLCT Lab, as we participated in many RISC-V and compiler technology-related conferences. There, we met many old and new friends. Currently, the RVCN Summit has started calling for papers and is shaping up to be the largest and busiest third summit.
On the ecosystem side, Wu Wei 吴伟, the PLCT Lab Supervisor announced the "towards one million RISC-V developers" initiative. A crazy outlook, but one that reflects great optimism. We will continue to go all-in for RISC-V's future.
- At SOPHGO's April 27th summit, Wu Wei 吴伟 delivered a keynote titled "Together Towards One Million RISC-V Software Developers" 携手迎接一百万RISC-V软件开发者. There, he proclaimed that RISC-V will be one amongst the top architectures. One million developers is all but the beginning for RISC-V's bright future. In the here and now, SOPHGO SG2042 will provide developers with tools for native development.
- At openEuler Compiler SIG's meeting in Hangzhou on April 7th, Liao Shihua 廖仕华 presented on the An Introduction to the GCC RTL Transfer Language and gave an interview. Wu Wei 吴伟 also presented Full Steam Foward: RISC-V SIG and Compiler SIG's LLVM Parallel Universe Project.
- Backporting upstream patches.
- 4452548: [riscv][isolate]Move Isolate::handle-scope-data to IsolateData(https://chromium-review.googlesource.com/c/v8/v8/+/4452548)(from jingpeiyang@eswincomputing.com)
- 4463777: [riscv][builtins] Refactor register allocation in CallApiCallback/CallApiGetter(https://chromium-review.googlesource.com/c/v8/v8/+/4463777)(from jingpeiyang@eswincomputing.com)
- 4478762: [riscv][assembler] Make UseScratchRegisterScope inlinable(https://chromium-review.googlesource.com/c/v8/v8/+/4478762)(from jingpeiyang@eswincomputing.com)
- 4431916: [riscv] Remove code/istream fields from RelocInfo(https://chromium-review.googlesource.com/c/v8/v8/+/4431916)
- 4380614: [riscv][builtins] Link up various offset for api calls | https://chromium-review.googlesource.com/c/v8/v8/+/4380614)
- 4394902: Reland "[riscv][api] Always use the-hole as default return" | https://chromium-review.googlesource.com/c/v8/v8/+/4394902)
- 4394942: [riscv] Using s8 as backtrack_stackpointer reg and optimize BranchShortHelper | https://chromium-review.googlesource.com/c/v8/v8/+/4394942)
- 4397342: [riscv][builtins] Streamline API calls | https://chromium-review.googlesource.com/c/v8/v8/+/4397342)
- 4394982: [riscv] Implement Label::Distance in Baseline | https://chromium-review.googlesource.com/c/v8/v8/+/4394982)
- 4405040: [riscv][code] Merge kind_specific_flags with flags | https://chromium-review.googlesource.com/c/v8/v8/+/4405040)
- Performance optimisation (RVV implementation with jinpeiyang@eswincomputing.com).
- 4410610: [riscv]Add signaling NaN test for vfmv instruction(https://chromium-review.googlesource.com/c/v8/v8/+/4410610)
- 4413948: [riscv][simulator] Implement vfmv_sf in the simulator(https://chromium-review.googlesource.com/c/v8/v8/+/4413948)
- 4380702: [riscv] Implement vfmerge instruction and test(https://chromium-review.googlesource.com/c/v8/v8/+/4380702)
- 4323700: [riscv]Remove duplicate source files in riscv architecture(https://chromium-review.googlesource.com/c/v8/v8/+/4323700)
- Upstreamed patches.
- Update RISC-V for JDK-8291555: https://github.com/openjdk/jdk/pull/10907/commits/d1c88261ac5f08e32d77ba9b1408c48a363df34a
- Use RISCV Zbs for JDK-8291555: https://github.com/openjdk/jdk/files/11257602/riscv-test_bit.txt
- Reviewed patches.
- openjdk/jdk#12682 (8302908: RISC-V: Support masked vector arithmetic instructions for Vector API)
- openjdk/jdk#13245 (8305247: On RISC-V generate_fixed_frame() sometimes generate a relativized locals value which is way too large)
- openjdk/jdk#13244 (8305236: Some LoadLoad barriers in the interpreter are unnecessary after JDK-8220051)
- openjdk/jdk#13079 (8304265: Implementation of Foreign Function and Memory API (Third Preview))
- openjdk/jdk#13368 (8305728: RISC-V: Add test_bit for power-of-two bit mask testing)
- openjdk/jdk#13477 (8300197: Freeze/thaw an interpreter frame using a single copy_to_chunk() call)
- openjdk/jdk#12706 (8306057: False arguments calling dispatch_base for aarch64)
- openjdk/jdk#13227 (8305056: Avoid unaligned access in emit_intX methods if not enabled)
- openjdk/jdk#13345 (8051725: Improve expansion of Conv2B nodes in the middle-end)
- Reviewed/Merged backported patches for the
riscv-port-jdk17u
repo.- openjdk/riscv-port-jdk17u#33 (8305512: RISC-V: Enable RVC extension by default on supported hardware)
- openjdk/riscv-port-jdk17u#34 (8290137: riscv: small refactoring for add_memory_int32/64)
- openjdk/riscv-port-jdk17u#35 (8293474: RISC-V: Unify the way of moving function pointer)
- openjdk/riscv-port-jdk17u#36 (8294430: RISC-V: Small refactoring for movptr_with_offset)
- openjdk/riscv-port-jdk17u#37 (8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites)
- openjdk/riscv-port-jdk17u#38 (8295270: RISC-V: Clean up and refactoring for assembler functions)
- openjdk/riscv-port-jdk17u#39 (8295968: RISC-V: Rename some assembler intrinsic functions for RVV 1.0)
- openjdk/riscv-port-jdk17u#40 (8293050: RISC-V: Remove redundant non-null assertions about macro-assembler)
- openjdk/riscv-port-jdk17u#41 (8296447: RISC-V: Make the operands order of vrsub_vx/vrsub_vi consistent with RVV 1.0 spec)
- openjdk/riscv-port-jdk17u#42 (8302776: RISC-V: Fix typo CSR_INSTERT to CSR_INSTRET)
- openjdk/riscv-port-jdk17u#43 (8292867: RISC-V: Simplify weak CAS return value handling)
- openjdk/riscv-port-jdk17u#44 (8293524: RISC-V: Use macro-assembler functions as appropriate)
- Submitted and merged JDK-mainline patches.
- openjdk/jdk#12682 | (8302908: RISC-V: Support masked vector arithmetic instructions for Vector API)(as co-authur)
- openjdk/jdk#13523 | (8306408: Fix the format of several tables in building.md)
- openjdk/jdk#13684 | (8306966: RISC-V: Support vector cast node for Vector API)(as co-authur)
- Backport for
jdk17u
.- openjdk/riscv-port-jdk17u#34 | (8290137: riscv: small refactoring for add_memory_int32/64)
- openjdk/riscv-port-jdk17u#35 | (8293474: RISC-V: Unify the way of moving function pointer)
- openjdk/riscv-port-jdk17u#36 | (8294430: RISC-V: Small refactoring for movptr_with_offset)
- openjdk/riscv-port-jdk17u#39 | (8295968: RISC-V: Rename some assembler intrinsic functions for RVV 1.0)
- openjdk/riscv-port-jdk17u#41 | (8296447: RISC-V: Make the operands order of vrsub_vx/vrsub_vi consistent with RVV 1.0 spec)
- openjdk/riscv-port-jdk17u#43 | (8292867: RISC-V: Simplify weak CAS return value handling)
- openjdk/riscv-port-jdk17u#44 | (8293524: RISC-V: Use macro-assembler functions as appropriate)
- openjdk/riscv-port-jdk17u#45 | (8293566: RISC-V: Clean up push and pop registers)
- Upstreamed patches.
jdk17u
backport.- 8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites
- 8295270: RISC-V: Clean up and refactoring for assembler functions
- 8293050: RISC-V: Remove redundant non-null assertions about macro-assembler
- 8302776: RISC-V: Fix typo CSR_INSTERT to CSR_INSTRET
- 8294012: RISC-V: get/put_native_u8 missing the case when address&7 is 6
- 8294679: RISC-V: Misc crash dump improvements
- Reported bug report(s).
- [https://bugs.openjdk.org/browse/JDK-8306008](Several Vector API tests fail for client VM after JDK-8304450)
- Upstreamed patches.
- Fix generate_native_entry about safepoint
- Add rv64 for debugger
- Add rv64 for test about .java
- Fix for jtreg cachedSocket becauseof JDK-8169041
- Add jdk_tier2
- Add rv64 for MetaspaceShared::generate_vtable_methods
- Add rv64 for test
- Fix LIR_Address::verify0() by adding rv64
- Fix cmove for NO_FLAG_REG
- Fix __ branch about gen_source_check
- Fix include for oerv
- Fix record_klass_in_profile_helper
- Fix generic_arraycopy
- Fix resolve_jobject
- Fix verify_oop_array
- Upstreamed patches.
- [ValueTracking] Guaranteed not to be undef if has dereferenceable attribute
- [LVI][CVP] Don't compute CR at SelectInst Use if Cond value may not be well-defined
- [LLDB][RISCV] Add RVV register infos
- [InstCombine] Combine const GEP chains
- [nfc][flang] Eliminate the dependency on cctype by using characters.h
- [RISCV] Custom lowering of llvm.is.fpclass
- [RISCV] Add DAG combine to fold (sub 0, (setcc x, 0, setlt)) -> (sra x , xlen - 1)
- Reviewed patches.
- [SimplifyCFG][LICM] Preserve nonnull, range and align metadata when speculating
- [GVN] Adjust metadata for coerced load CSE
- [LangRef][Local] dereferenceable metadata violation is UB
- [SROA] Remove UB-implying metadata when promoting speculative instruction
- [JITLink][RISCV] Handle R_RISCV_CALL_PLT fixups
- You may find more of our code review by searching under the names of the authors above.
Four of our patches received reviews, we are working to update them according to the suggestions received.
- GCC 13 was released on April 26th. You may find a list of RISC-V-related changes on the "RISC-V" section ChangeLog.
- Submitted a proposal for RISC-V Profiles implementation in the GNU toolchain, see our draft.
- Continuing maintenance for RVV intrinsic-test-generator, see the code repository.
- Submitted GCC patch for the ZC extension, currently under review.
- Drafted documentation to outline RISC-V extension version control implementation in the GNU toolchain.
- Fixed an issue where
--with-isa-spec
options are inconsistent in our RISC-V GNU toolchain repository, we have updated the option specification to version20191213
. - Continuing to fix errors found in regression testing, see patch.
- Slides from the bi-weekly RISC-V GNU Toolchain meetings.
No update this month.
Stats: 7801/18716, 41.68% (https://whale.plctlab.org/riscv/support-statistics/)
- A total of 69 keywording commits (include non-PLCT team members): https://whale.plctlab.org/riscv/stats/2023_04.txt
- app-admin/salt: Keyword 3006.0 ~riscv, gentoo/gentoo@4bac24b
- dev-ruby/rails: Keyword 7.0.4.3-r1 riscv, gentoo/gentoo@9cc026c
- media-sound/kasts: Keyword 23.04.0 ~riscv, gentoo/gentoo@2919be0
- www-client/firefox: keyword 111.0 for ~riscv, gentoo/gentoo@1331779
- www-servers/puma: Keyword 6.1.1-r1 riscv, gentoo/gentoo@56c3916
- opencl related packages:
- virtual/opencl: Keyword 3-r2 riscv, gentoo/gentoo@1c0f669
- dev-util/opencl-headers: Keyword 2023.02.06 riscv, gentoo/gentoo@c7bb7a4
- dev-libs/opencl-icd-loader: Keyword 2023.02.06 riscv, gentoo/gentoo@e47a050
- riscv overlay
- new package: app-emulation/qtrvsim, gentoo/riscv@67c378f , this is a RISC-V CPU simulator for education purposes.
- fix a bug in firefox 112.0.1, https://bugs.gentoo.org/904532
- [WIP] Ceph
- standalone mon, mgr, osd, mds test pass
- cluster still in testing
- doc: standalone deployment documentation
- patches:
- libvisio: set strictDeps, remove unneeded configureFlags NixOS/nixpkgs#229072
- ruby_3_2: only enable yjit on supported platforms NixOS/nixpkgs#229070
- python3Packages.s3transfer: remove unused inputs, fix cross compilation NixOS/nixpkgs#229067
- python3Packages.aiohttp: add setuptools to nativeBuildInputs NixOS/nixpkgs#229065
- alephone: fix cross compilation by setting AR in makeFlags NixOS/nixpkgs#228516
- iksemel: fix cross compilation NixOS/nixpkgs#228515
- matio: build with cmake, fixes cross compilation NixOS/nixpkgs#228438
- tcsh: fix cross compilation NixOS/nixpkgs#224001
- abiword: fix cross NixOS/nixpkgs#226557
- alacritty: fix cross NixOS/nixpkgs#225119
- chafa: fix cross-compilation NixOS/nixpkgs#224923
- streamripper: fix cross compilation NixOS/nixpkgs#224900
- Routine upstream maintenance work.
This month, we focused on implementing and improving basic DynamoRIO instructions to prepare for drrun
support.
- Submitted upstream patch(es).
In the past year, to implement the variable-length RISC-V Vector backend, we introduced incompatible API changes to the OpenCV Universal Intrinsic, leaving about 400 code changes to migrate in the source tree.
Since manual migration would take considerable labor, we are developing an automated Universal Intrinsic code migrator. Last month, we finished its prototype design, see the code repository.
- Patches under review.
- D144698:[libcxx] <experimental/simd> Removed original implementations and tests
- D144362:[libcxx] <experimental/simd> Add ABI tags, class template simd/simd_mask implementations. Add related simd traits and tests.
- D144363:[libcxx] <experimental/simd> Added aliagned flag types, some simd traits and related tests
- D144364:[libcxx] <experimental/simd> Added internal storage type, constructors, subscript operators of class simd/simd_mask and related tests
- Other ongoing work.
- Started removing C++20 code to ensure C++17 compatibility.
- Deployed GitHub Actions CI.
- Fixed incorrect data output in some unary operator and scalar data output in
where
expressions.
- We announced the Chinese: 基于C++标准库experimental/simd的OpenCV后端移植与优化 project for this year's OSPP program. We look forward to your applications.
This month, we focused on troubleshooting the JIT backend, particularly the IR assembler.
We made preliminary adjustments to the tracing number handler to better fit RISC-V and fixed some IR assembler bugs. Exit number handling scheme is expected to have more changes later.
The LuaJIT/LuaJIT-test-cleanup benchmark suite reveals more anomalies, such as binary-trees
is slower than interpreter and nsieve-bit
produce wrong result. This would be our focus in May.
- Follow new global FMA flag infiWang/LuaJIT@ac4c8cb
- Fix asm_fpunary with pseudo-instruction infiWang/LuaJIT@3ce156c
- Fix asm_mulov infiWang/LuaJIT@f9e6cd0
- Optimize asm_mulov infiWang/LuaJIT@d6e76b1
- Fix trace number handling infiWang/LuaJIT@43c235d
- Tune exit number loading infiWang/LuaJIT@a04a0d6
- Fix asm_fpcomp infiWang/LuaJIT@22c701e
- Fix asm_min_max with integer infiWang/LuaJIT@708c30c
No update this month.
- Updated Zc extension to v12.
- Optimized env/cfg.
- Fixes for the addr class.
- Fixed env->bins values.
- Updated optimizations for RVH-related checks and code style fixes
- Added ACT support.
- Fixed issues with MPP.
- Fixed issues with Pointer Mask.
- Added support for PC relative translation
- Added Zdinx dependency check for Zfinx
- Attempted to fix priv section compatibility.
- Added support for BF16.
- Fixed issues with PMP.
This month, we continued to improve box64's RISC-V JIT dynamic recompiler. At the time of writing, we implemented support for frequently-used instructions, most applications may run as intended with dynamic recompiler. In comparison to the ~1040 instructions supported by the ARM64 backend, the RV64 backend currently supports ~580 instructions.
We tested some games on the VisionFive 2. Some games now runs smoothly on the development board, such as the Mono-based Stardew Valley. Wine64 also runs correctly.
The follows are the pull requests that were merged upstream.
- xctan
- ksco
- Fixed 8F POP opcode
- Added more opcodes
- Added more opcodes
- Added more opcodes
- Added more opcodes
- Added more 66 0F opcodes
- Added more opcodes
- Added more opcodes
- Added A1/A2/A3 MOV opcodes
- Added more opcodes
- Added more opcodes
- Added more opcodes
- Added more opcodes
- Added more opcodes and some fixes
- Remove 66 0F 3A 0B ROUNDSD opcode for now
- Fixed some bugs
- Added more opcode and some fixes
- Fixed a use-after-free issue
- Added more fontconfig wrapped functions
- Added more opcodes
- Added more opcodes
- Fixed mpg123 wrapper
- Fixed a libFLAC func wrapper (for #701)
- Added more opcodes for SV
- Make test09 deterministic
- Added more 66 0F opcodes for SV and some fixes
- Added 0F AE /0,/1 opcodes
- Added more opcodes for SV and some fixes
- Add more opcodes for SV
- Added more opcodes for SV, some fixes & optims also
- Fixed emit_sub8/16
- Added more opcodes for SV
- Added more opcode for SV and some fixes
- Added more 66 0F opcode for SV
- Small optim for F2 0F 5D MINSD opcode
- Disable compiler optimizations for test17 and some related fixes
- Added more opcodes for SV and some fixes
- Added more opcodes for Stardew Valley and some fixes
- Added more opcodes for Stardew Valley and some fixes
- Added more SSE opcodes for Stardew Valley
- Added more opcodes for Stardew Valley
- Added more opcodes from SSE tests
- Added 66 0F 2B MOVNTPD opcode & fixed some edge cases
- Added more opcodes for Stardew Valley
- Added 0F BA /4 BT opcode & some fixes
- Reverted changes to GETED and fixed emit_and32*
- Small fixes caught by cosim
- Added more opcodes for Stardew Valley
- Added support for Zfbfmin.
Shi Ninging (史宁宁) continues to work on compiling the OpenArkCompiler Weekly, which just published its 159th issue.
You may find new weekly issues of the OpenArkCompiler Weekly on Sundays on...
- GitHub: https://github.com/isrc-cas/arkcompiler-materials
- Zhihu: https://zhuanlan.zhihu.com/openarkcompiler
- Bilibili: https://www.bilibili.com/read/readlist/rl199373
- Mailing list and other channels: https://gitee.com/openarkcompiler/OpenArkCompiler/issues/I1EWAX
- [WIP] New proposal for Vector Mask and Dynamic VL - we completed performance benchmark for proposal 1 and are currently writing a demo program for proposal 3.
- Integrate vector length configuration with the current mask operation.
- Create a standalone vector length operation.
- Integrate dynamic vector representation into ODS.
- Buddy Compiler Homepage - https://buddy-compiler.github.io/
- Buddy Compiler's OSPP 2023 Project Home - https://summer-ospp.ac.cn/org/orgdetail/8d995d4c-b188-4690-9a53-c022dc7c19e3?lang=zh
buddy-caas
- Buddy Compiler As A Service(Buddy-CAAS)- https://buddy.isrc.ac.cn/
buddy-mlir
Code repository: https://github.com/buddy-compiler/buddy-mlir
buddy-benchmark
Code repository: https://github.com/buddy-compiler/buddy-benchmark
No update this month.
No update this month.
- firmware: Optimize loading relocation type
- firmware: Change to use positive offset to access relocation entries
- lib: utils/fdt: Parse for UART "clocks" property if "clock-frequency" is absent
- lib: sbi: Add debug print when sbi_pmu_init fails
- lib: sbi: Remove unnecessary semicolon
- lib: sbi: Simplify sbi_ipi_process remove goto
- lib: sbi: Simplify BITS_PER_LONG definition
- Introduce and use simple heap allocator
- lib: sbi: Ensure SBI extension is available
- lib: sbi: Optimize probe of srst
- Merged WASI-eBPF plugin support for WasmEdge, #2314
- eunomia-bpf framework.
- Rewrote parts of bpf-loader in Rust, this component is now written purely in Rust, #190 #198 #206 #217
- Completed and merged API-server component and implemented related command-line features, #169
- Successfully ported to and tested on Android, #203
- Added OCI login component, #205
- Fixed an issue with static variable loading, #215
- Fixed issues with i128, #202
- wasm-bpf toolchain.
- Added examples for uprobe and xdp, #107
- rust-struct-bindgen: A rust source code generator to read & write native structs with BTF.
- GPTtrace.
- Used vector data library to replace previous prompts, #7
- An interactive eBPF knowledge base for ChatGPT, https://github.com/eunomia-bpf/ebpf-knowledge-base
- OSPP projects.
- Continued to improve tutorial link.
- Added chapters on profile,memleak,tcprtt,lsm, etc., #link
- Fixed a series of minor issues.
No update this month.
No update this month.
In order to profile RISC-V compiler performance, we implemented an automated test script for SPEC CPU2017, which downloads and builds GCC/LLVM, runs the benchmarks, and collects results. You may find the script here.
With this we ran CPU2017 tests using LLVM 17.0.0 and GCC 12.1.0. GCC 12.2.0 failed to build, an issue has thus been reported.
- Implemented automation scripts which operates and collects OBS data. Script to delete specific packages from OBS projects via API
- Assembled slides for openEuler community's QA SIG investigation reports on unixbench,stream,fio,netperf,lmbench.
- Deployed Kernel CI.
- Periodically build and release kernel images using GitHub Actions, see script and released images.
- Patched
lava-docker
source code and deployed Lava. - Successfully booted kernel under Qemu riscv64 using Github Actions + Lava, as well as building and running a Hello World program.
- Added Unmatched to Lava to run jobs. We are currently ironing out issues with running jobs on this device.
Under re-organization, no update this month.
- PLCT's 2022 Roadmap, https://github.com/plctlab/PLCT-Weekly/blob/master/PLCT-Roadmap-2022.md
- Open job positions at the PLCT Lab, https://github.com/plctlab/PLCT-Weekly/blob/master/Jobs.md
- Open intern positions at the PLCT Lab, https://github.com/plctlab/weloveinterns/blob/master/open-internships.md
- PLCT Weekly Reports, https://github.com/isrc-cas/PLCT-Weekly
- PLCT Open Reports (incomplete), https://github.com/isrc-cas/PLCT-Open-Reports