RFR: 8319822: Use a linear-time algorithm for assert_different_registers() [v3]

Andrew Haley aph at openjdk.org
Fri Nov 17 15:31:31 UTC 2023


On Wed, 15 Nov 2023 22:53:40 GMT, Dean Long <dlong at openjdk.org> wrote:

> I ran into a case where I was doing assert_different_registers() on base() and index() from an Address. How hard would it be to have assert_different_registers() support an Address as an argument?

Quite tricky, partly because `Address` isn't a shared type. I would have thought it best to make it explicit anyway, with something like
`different_registers(a.base(), a.index(), rsi, ...);`
We'd need to make sure that `base()` and `index()` return `noreg` whenever the `Address` is wrong, e.g. a literal.

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

PR Comment: https://git.openjdk.org/jdk/pull/16617#issuecomment-1816634317


More information about the hotspot-compiler-dev mailing list