RFR: 8333382: [s390x] Enhance popcnt Instruction to use Z15 facilities [v4]

Andrew Haley aph at openjdk.org
Mon Jun 10 15:15:14 UTC 2024


On Mon, 10 Jun 2024 14:15:44 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

> > anywhere else must provide a register to use or have some sort of conditionals at the point pop_count_int is used.
> 
> So for machines `<=Z14` we will never go in the `if` block; And the moment we enter in `else` block there is check, which confirms `r_tmp` shouldn't be `noreg` which will force author to pass a temporary register. Isn't it ?

The point is to avoid the failure where testing is done on Z15 and up, but some customers have earlier machines. A maintenance programmer uses popcount and all the testing on Z15 passes. The first person to see the failure is the customer. We're setting a trap for maintainers.

This is not a complaint about the ad file use case. It's about anywhere else that popcount is used in hand-written assembly code. I'm telling you this from painful experience on AArch64.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19509#discussion_r1633423607


More information about the hotspot-dev mailing list