Skip to content
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

Refactor - lduw to hor64 #496

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Refactor - lduw to hor64 #496

merged 2 commits into from
Aug 3, 2023

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Aug 3, 2023

It makes more sense for the lduw (load upper word immediate) instruction introduced in #486 to be an arithmetic class instruction as it resembles or64 reg, imm the most, just that it is a high-operand version of it. This also empties the load immediate BPF instruction class in SBPFv2.


In the LLVM backend, the instruction info just needs to be adjusted slightly (marked as bold):
https://github.com/solana-labs/llvm-project/blob/7b8db05b564faffb522434b73b7082662171f94a/llvm/lib/Target/SBF/SBFInstrInfo.td#L337

first instructionsecond instruction
opdstsrcoffsetimmopdstsrcoffsetimm
before0x18reg000..320x0000032..64
after0xB4reg000..320xF7reg0032..64

@codecov-commenter
Copy link

Codecov Report

Merging #496 (cbe0cd9) into main (42e5b3b) will decrease coverage by 0.01%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##             main     #496      +/-   ##
==========================================
- Coverage   89.63%   89.63%   -0.01%     
==========================================
  Files          23       23              
  Lines       10105    10104       -1     
==========================================
- Hits         9058     9057       -1     
  Misses       1047     1047              
Files Changed Coverage Δ
src/disassembler.rs 93.36% <0.00%> (ø)
src/ebpf.rs 79.59% <ø> (ø)
src/assembler.rs 98.82% <100.00%> (-0.01%) ⬇️
src/interpreter.rs 97.67% <100.00%> (ø)
src/jit.rs 92.45% <100.00%> (ø)
src/static_analysis.rs 65.82% <100.00%> (ø)
src/verifier.rs 97.50% <100.00%> (ø)

@Lichtso Lichtso merged commit d43d962 into main Aug 3, 2023
12 checks passed
@Lichtso Lichtso deleted the refactor/lduw_to_hor64 branch August 3, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants