[aarch64-port-dev ] Unnecessary branch in MacroAssembler::corrected_idivl

Andrew Haley aph at redhat.com
Wed Mar 26 08:29:23 UTC 2014


Hi,

On 03/26/2014 01:08 AM, D.Sturm wrote:

> since I'm checking special cases, etc. in the Graal compiler generated code
> I generally also check the HotSpot code to see if it does equivalent
> things. Is it actually useful if I report small discrepances where it seems
> HotSpot generates inefficient code such as the following?

Yes, absolutely.  Please.

> Anyhow, since we're already at it - according to the ARMv8 ISA for division:
> "If a signed integer division (INT_MIN ÷ -1) is performed, where INT_MIN is
> the most negative integer value representable in the selected register
> size, then the result will overflow the signed integer range. No indication
> of this overflow is produced and the result written to the destination
> register will be INT_MIN."
> 
> So the special case for INT_MIN / -1 in MacroAssembler::corrected_idivl is
> unnecessary since that fits exactly the JLS definition for division.

Excellent, thanks.  I wrote this code before we had complete specs
for ARMv8, so I was being cautious.  We need a good way to collect
these discrepancies.  I'd like to use the OpenJDK jira, but it doesn't
allow everyone to create bugs.

BTW, I am totally fascinated by your Graal work.  It's be great to
see what you're doing.

Andrew.



More information about the aarch64-port-dev mailing list