Closed Bug 1895850 Opened 2 years ago Closed 2 years ago

[loong64] test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation.js test failed

Categories

(Core :: JavaScript Engine: JIT, defect)

Other
Unspecified
defect

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: zhaojiazhong-hf, Assigned: zhaojiazhong-hf)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On LoongArch64 platform, jstests test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/conversion-operation.js may fail, I can reproduce it with clang13 and gcc build, but not clang8.

I find that it's because live volatile fpu registers are not saved and restored properly in JIT code when needs to call into c++ functions, which is caused by wrong FloatRegisters::NonVolatileMask and FloatRegisters::VolatileMask.

1 << FloatRegisters::f31 equals to 0x80000000, which makes the mask a negative value before it's coverted to uint64_t, so the upper 32 bits of the mask are not clean, and caused the bug.

  • 1 << f31 is negative, and may cause dirty upper bits of masks
  • Use same name for single and double fpu registers
Assignee: nobody → zhaojiazhong-hf
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/588d72142f99 [loong64] Fix FPU register masks and names. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: