RFR: 8333382: [s390x] Move population_count implementation out of ad file

Amit Kumar amitkumar at openjdk.org
Tue Jun 4 19:12:24 UTC 2024


We need to move popcnt instruction implementation out of s390.ad file as it is required to be required some methods present in [JDK-8331126.](https://bugs.openjdk.org/browse/JDK-8331126)


When the miscellaneous-instruction-extensions facility 3 is not installed or bit 0 of the M3
 field is zero, a count of the number of one bits in each of the eight bytes of general register
 R2 is placed into the corresponding byte of general register R1. Each byte of general register 
R1 is an 8-bit binary integer in the range of 0-8.



When the miscellaneous-instruction-extensions facility 3 is installed and bit 0 of the M3 field
is one, a count of the total number of one bits in the 64-bit general register R2 is placed into 
general register R1. The result is a 64-bit unsigned integer in the range 0 to 64.


Performed tier1 test on fastdebug build and didn't see any regression.

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

Commit messages:
 - cleanup
 - split method for long & int
 - restrict previous match rules
 - facility 3 support
 - only relocation
 - pop_count

Changes: https://git.openjdk.org/jdk/pull/19509/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19509&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8333382
  Stats: 126 lines in 5 files changed: 99 ins; 16 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/19509.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19509/head:pull/19509

PR: https://git.openjdk.org/jdk/pull/19509


More information about the hotspot-dev mailing list