Open Bug 2009158 Opened 2 days ago Updated 1 day ago

[riscv64] Use Zba and Zbb extensions more in [Macro]Assembler-riscv64

Categories

(Core :: JavaScript Engine: JIT, task)

RISCV64
Unspecified
task

Tracking

()

People

(Reporter: csmantle, Unassigned)

References

Details

Attachments

(6 files)

Inspired by [^1] and [^2] (Chinese), we may be able to fuse more instructions using Zba and Zbb instructions, thanks to the foundation laid by Bug 2003218.

Hardware: Unspecified → RISCV64
Depends on: 2003218
Summary: [riscv64] Use Zba and Zbb extensions more in Assembler-riscv64 → [riscv64] Use Zba and Zbb extensions more in [Macro]Assembler-riscv64

Hi Jan, when reading the implementation of minMaxPtr [^1], I find it interesting that it uses signed comparisons (Assembler::GreaterThanOrEqual and Assembler::LessThanOrEqual). I guess there are some special considerations behind this, as other architectures also use signed comparisons, but I haven't figured it out yet. Would you mind providing me with some pointers on this?

Flags: needinfo?(jdemooij)

(In reply to Rong Bao [:csmantle] from comment #7)

Hi Jan, when reading the implementation of minMaxPtr [^1], I find it interesting that it uses signed comparisons (Assembler::GreaterThanOrEqual and Assembler::LessThanOrEqual). I guess there are some special considerations behind this, as other architectures also use signed comparisons, but I haven't figured it out yet. Would you mind providing me with some pointers on this?

Initially we had the Int32 version (minMax32) where we need signed comparisons because this is used for the result of Math.min and Math.max. Unsigned comparisons would give us the wrong results.

minMaxPtr is used for the MIRType::IntPtr version and I think we similarly want the signed version for things like this.

Flags: needinfo?(jdemooij)

Thanks.

I'm collecting perf numbers of before and after this stack, but preliminarily it doesn't show much observable improvements. Will look into the cause of this.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: