Closed Bug 2047249 Opened 5 months ago Closed 5 months ago

Support veneer branches longer than short branches

Categories

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

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(4 external files)

Support case when veneer branches are longer than short branches in AssemblerBufferWithConstantPools. This will allow to remove the branch padding added in bug 1996840.

The pool guard branch for RISCV64 is a single jal instruction, so
guardSize should be 1.

Drive-by fix:

  • Change headerSize to 1 to match the instruction written in WritePoolHeader.

Add a test case when veneer branches are longer than short branches.

The test case will cause an assertion without the changes from part 3.

Account for veneers which are longer than short branches.

ARM64 has VeneerSize = 1 which should allow the compiler to fold everything in
sizeOfPrimaryVeneers to return zero. So this change only has an effect for
RISCV64, where VeneerSize = 2.

This is no longer needed after the changes from part 3.

Severity: -- → N/A
Priority: -- → P1

Backed out for causing build bustages at testAssemblerBuffer.cpp
Backout link
Push with failures
Failure log(s)

Flags: needinfo?(andrebargull)

"testAssemblerBuffer.cpp" contains a variable which is only used in MOZ_ASSERT, which leads to an "unused variable" warning in opt-builds.

Flags: needinfo?(andrebargull)
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: