bitwise operator support webrev

Christian Thalinger christian.thalinger at oracle.com
Mon Oct 21 10:28:25 PDT 2013


Will do.

On Oct 21, 2013, at 8:50 AM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:

> Doug and Christian,
> 
> If there are no further edits required, please integrate this webrev into the Graal OpenJDK repository. 
> 
> Please attribute the changes to Vasanth Venkatachalam.
> 
> Commit message: Adds support to the HSAIL backend for three of the bitwise logical operators, bitwise AND, bitwise OR and bitwise XOR.
> 
> Thanks.
> 
> Vasanth
> 
> -----Original Message-----
> From: Doug Simon [mailto:doug.simon at oracle.com] 
> Sent: Saturday, October 19, 2013 3:53 AM
> To: Christian Thalinger
> Cc: graal-dev at openjdk.java.net; Venkatachalam, Vasanth
> Subject: Re: bitwise operator support webrev
> 
> Christian,
> 
> Can you please integrate these changes. Thanks.
> 
> -Doug
> 
> On Oct 19, 2013, at 2:55 AM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:
> 
>> I've made the fixes you recommended.
>> 
>> Vasanth
>> 
>> -----Original Message-----
>> From: Christian Thalinger [mailto:christian.thalinger at oracle.com] 
>> Sent: Friday, October 18, 2013 11:12 AM
>> To: Venkatachalam, Vasanth
>> Cc: graal-dev at openjdk.java.net
>> Subject: Re: bitwise operator support webrev
>> 
>> graal/com.oracle.graal.lir.hsail/src/com/oracle/graal/lir/hsail/HSAILArithmetic.java:
>> 
>> Could you remove the // @formatter:off in that file so we get proper formatting?  Or at least turn it on after the enum values.
>> 
>> You should also fix the copyright years in you new test files:
>> 
>>  2  * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
>> 
>> Use "2013, ".
>> 
>> Otherwise this looks good.
>> 
>> On Oct 18, 2013, at 8:39 AM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:
>> 
>>> Hi,
>>> 
>>> I've uploaded a webrev that extends the HSAIL backend to generate code for three of the bitwise logical operators AND, OR and XOR.
>>> 
>>> http://cr.openjdk.java.net/~tdeneau/bitwiseopsupport.03/webrev/
>>> 
>>> Please review and provide feedback.
>>> 
>>> Summary:
>>> 
>>> The main changes are in HSAILLIRGenerator, where I implemented the routines emitOr and emitXor which were previously throwing NYIs, and in HSAiLAssembler, where I added a routine, emitBitwiseLogical. I've added test cases to test these bitwise operations on all the primitive types that they support. There are two variants of each test case, one which casts the result of the bitwise operation to the original data type that was being operated on (e.g., byte, char, short) and another which simply returns the default return type which is an int.
>>> 
>>> To support the cast operation that the new tests exercise I also had to enhance the emitConvert( ) routine in HSAILLiRGenerator to handle additional types of conversions which weren't previously supported.  In particular, I2S, I2C and I2B required special handling since Graal was returning an int for the destination. This required me to refactor the emitConvert routine in the assembler into multiple routines. I've also added additional test cases to exercise the different conversion types that this webrev adds support for.
>>> 
>>> Vasanth
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> 



More information about the graal-dev mailing list