On 09/06/2011 05:51 PM, Charles Oliver Nutter wrote:
> On Tue, Sep 6, 2011 at 10:39 AM, Rémi Forax<fo...@univ-mlv.fr>  wrote:
>> Yes, but don't forget that PHP.reboot has no overflow check.
> Did we ever figure out if it's possible to trick Hotspot into doing a
> JO instead of the raw bit-level operations? John/Christian/Tom: what
> would it take to get HS to "know" that we're doing an integer
> overflow-after-maths check and do the (faster?) JO?
>
> Rémi: For what it's worth, I did specialize +/- for 1 and 2 in the
> indy-based call protocols to avoid a full overflow check.

If you have specialize for -2/+2, you should reuse exactly the same code 
for +n/-n.
see 
https://code.google.com/p/jsr292-cookbook/source/browse/trunk/binary-operation/src/jsr292/cookbook/binop/RT.java#11

>
> - Charlie

Rémi

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to