Request for reviews (L): 6823354: Add intrinsics for{Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Mon May 4 14:36:35 PDT 2009


Christian,

assembler_x86.hpp - could you use one #ifdef ?

+
+ #ifdef _LP64
+   void bsfq(Register dst, Register src);
+ #endif
+
+   void bsrl(Register dst, Register src);
+
+ #ifdef _LP64
+   void bsrq(Register dst, Register src);
+ #endif


x86_32.ad - Why you did not remove TEMP dst? Do you need it?

+   effect(TEMP dst


connode.cpp - new Ideal methods should be Value methods since
it is the value transformation and it misses checks for Top:

const Type* CountLeadingZerosINode::Value( PhaseTransform *phase ) const {
    const Type *t = phase->type( in(1) );
    if( t == Type::TOP ) return Type::TOP;
    const TypeInt *ti = t->isa_int();
    if (ti && ti->is_con()) {

Thanks,
Vladimir

Christian Thalinger wrote:
> Here is the third version of the patch:
> 
> http://cr.openjdk.java.net/~twisti/6823354/webrev.03/
> 
> This version includes all suggested changes from Vladimir and changes I
> talked about with Tom on the phone.  Additionally I enhanced the
> testcase.
> 
> -- Christian
> 



More information about the hotspot-compiler-dev mailing list