Use snippets in LIRGenerator

Christian Wimmer christian.wimmer at oracle.com
Wed Mar 26 15:08:45 UTC 2014


I already have code that introduces the explicit division-by-zero checks 
using Snippets. I'll send it to you later in a direct email.

-Christian


On 3/26/2014 4:58 AM, D.Sturm wrote:
> Hi,
> Division under aarch64 does not generate an implicit exception in case of
> division by 0, therefore I have to generate code along the lines of:
>
> if (divisor == 0) throw new ArithmethicException("Division by 0");
> result = dividend / divisor;
>
> for emitDiv, etc. Now I could implement that all as low-level code in the
> LIR, but on the other hand we already know how to create new objects and
> throw exceptions, so I was wondering if there's a way to use Snippets to
> avoid doing this manually?
>
> -- Daniel
>



More information about the graal-dev mailing list