RFR: JDK-8331732 : [PPC64] Unify and optimize code which converts != 0 to 1 [v12]

Amit Kumar amitkumar at openjdk.org
Fri Jun 28 16:16:19 UTC 2024


On Fri, 28 Jun 2024 15:45:55 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

> > Things you may consider:
> > 
> > 1. `is_64bit` also could be set to a default value; i.e. by default make it `true`;
> > 2. I can see that `R0` is used temp register consistently, maybe make it default;
> 
> 1. I am not sure if we have a defined default behaviour for it. We are doing the appropriate behaviour based on the version check.So by definition it does not sound to me like there is a default behaviour.


My intention was to update normalize_bool method like this: 

 void inline normalize_bool(Register dst, Register temp=R0, bool is_64bit = true);

That way you don't have to pass it everywhere.


> 2. Yes R0 is used, but i think we should have the flexibility to use any register. Making it to R0 default is sounding like R0 is defined just for this, which is not true.

I didn't get it. It will be like you have a default register present, but if situation states that you can't use `R0` then pass a custom register.

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

PR Comment: https://git.openjdk.org/jdk/pull/19886#issuecomment-2197252730


More information about the hotspot-dev mailing list