Closed Bug 2043256 Opened 5 months ago Closed 5 months ago

Rename and clean-up functions to patch immediates in riscv64

Categories

(Core :: JavaScript Engine: JIT, task, P1)

task

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(2 external files)

  • ExtractLoad64Value and UpdateLoad64Value can handle li_ptr and li_constant immediates, but WriteLoad64Instructions only handles li_ptr immediates.
  • ExtractLoad64Value reads li_ptr immediates by calling jumpChainTargetAddressAt.
  • And UpdateLoad64Value updates li_ptr immediates through jumpChainSetTargetValueAt.
  • patchMove32 updates Imm32 by calling patchSub32FromStackPtr.

This is all confusing and makes the code harder to understand. Let's improve the function names and move related functions closer to each other.

Changes:

  • Add {Load,Update,Write}LiPtrInstructions to read/write to li_ptr instructions.
  • Add {Load,Update}LiConstantInstructions to read/write to li_constant instructions.
  • The actual operations are defined in the new classes LiPtr and LiConstant to place
    related functions next to each other.

Add patchLi32 because it's confusing that patchMove32 calls
patchSub32FromStackPtr to modify the embedded immediate.

Severity: -- → N/A
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
QA Whiteboard: [qa-triage-done-c154/b153]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: