graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILLIRGenerator.java

Print this page
rev 13953 : Changes to remove the enum in HSAILMathIntrinsicsNode.


 631 
 632     @Override
 633     public void emitBitCount(Variable result, Value value) {
 634         if (value.getKind().getStackKind() == Kind.Int) {
 635             append(new HSAILBitManipulationOp(IPOPCNT, result, value));
 636         } else {
 637             append(new HSAILBitManipulationOp(LPOPCNT, result, value));
 638         }
 639     }
 640 
 641     @Override
 642     public void emitBitScanForward(Variable result, Value value) {
 643         throw GraalInternalError.unimplemented();
 644     }
 645 
 646     @Override
 647     public void emitBitScanReverse(Variable result, Value value) {
 648         throw GraalInternalError.unimplemented();
 649     }
 650 






 651     @Override
 652     public Value emitMathAbs(Value input) {
 653         throw GraalInternalError.unimplemented();














 654     }
 655 






























 656     @Override
 657     public Value emitMathSqrt(Value input) {
 658         Variable result = newVariable(input.getPlatformKind());
 659         append(new Op1Stack(SQRT, result, input));
 660         return result;
 661     }
 662 
 663     @Override
 664     public Value emitMathLog(Value input, boolean base10) {
 665         throw GraalInternalError.unimplemented();
 666     }
 667 
 668     @Override
 669     public Value emitMathCos(Value input) {
 670         throw GraalInternalError.unimplemented();
 671     }
 672 
 673     @Override
 674     public Value emitMathSin(Value input) {
 675         throw GraalInternalError.unimplemented();


 767         Debug.log("visitSafePointNode unimplemented");
 768     }
 769 
 770     @Override
 771     public void emitUnwind(Value operand) {
 772         throw GraalInternalError.unimplemented();
 773     }
 774 
 775     @Override
 776     public void emitNullCheck(ValueNode v, DeoptimizingNode deopting) {
 777         assert v.kind() == Kind.Object;
 778         Variable obj = newVariable(Kind.Object);
 779         emitMove(obj, operand(v));
 780         append(new HSAILMove.NullCheckOp(obj, state(deopting)));
 781     }
 782 
 783     @Override
 784     public void visitInfopointNode(InfopointNode i) {
 785         throw GraalInternalError.unimplemented();
 786     }

 787 }


 631 
 632     @Override
 633     public void emitBitCount(Variable result, Value value) {
 634         if (value.getKind().getStackKind() == Kind.Int) {
 635             append(new HSAILBitManipulationOp(IPOPCNT, result, value));
 636         } else {
 637             append(new HSAILBitManipulationOp(LPOPCNT, result, value));
 638         }
 639     }
 640 
 641     @Override
 642     public void emitBitScanForward(Variable result, Value value) {
 643         throw GraalInternalError.unimplemented();
 644     }
 645 
 646     @Override
 647     public void emitBitScanReverse(Variable result, Value value) {
 648         throw GraalInternalError.unimplemented();
 649     }
 650 
 651     /**
 652      * Emit the LIR code for the Math.Abs intrinsic.
 653      * 
 654      * @param input the source operand
 655      * @return Value representing the result of the operation
 656      */
 657     @Override
 658     public Value emitMathAbs(Value input) {
 659         Variable result = newVariable(input.getPlatformKind());
 660         append(new Op1Stack(ABS, result, input));
 661         return result;
 662     }
 663 
 664     /**
 665      * Emit the LIR code for the Math.Ceil intrinsic.
 666      * 
 667      * @param input the source operand
 668      * @return Value representing the result of the operation
 669      */
 670     public Value emitMathCeil(Value input) {
 671         Variable result = newVariable(input.getPlatformKind());
 672         append(new Op1Stack(CEIL, result, input));
 673         return result;
 674     }
 675 
 676     /**
 677      * Emit the LIR code for the Math.Floor intrinsic.
 678      * 
 679      * @param input the source operand
 680      * @return Value representing the result of the operation
 681      */
 682     public Value emitMathFloor(Value input) {
 683         Variable result = newVariable(input.getPlatformKind());
 684         append(new Op1Stack(FLOOR, result, input));
 685         return result;
 686     }
 687 
 688     /**
 689      * Emit the LIR code for the Math.Rint intrinsic.
 690      * 
 691      * @param input the source operand
 692      * @return Value representing the result of the operation
 693      */
 694     public Value emitMathRint(Value input) {
 695         Variable result = newVariable(input.getPlatformKind());
 696         append(new Op1Stack(RINT, result, input));
 697         return result;
 698     }
 699 
 700     /**
 701      * Emit the LIR code for the Math.sqrt intrinsic.
 702      * 
 703      * @param input the source operand
 704      * @return value representing the result of the operation
 705      */
 706     @Override
 707     public Value emitMathSqrt(Value input) {
 708         Variable result = newVariable(input.getPlatformKind());
 709         append(new Op1Stack(SQRT, result, input));
 710         return result;
 711     }
 712 
 713     @Override
 714     public Value emitMathLog(Value input, boolean base10) {
 715         throw GraalInternalError.unimplemented();
 716     }
 717 
 718     @Override
 719     public Value emitMathCos(Value input) {
 720         throw GraalInternalError.unimplemented();
 721     }
 722 
 723     @Override
 724     public Value emitMathSin(Value input) {
 725         throw GraalInternalError.unimplemented();


 817         Debug.log("visitSafePointNode unimplemented");
 818     }
 819 
 820     @Override
 821     public void emitUnwind(Value operand) {
 822         throw GraalInternalError.unimplemented();
 823     }
 824 
 825     @Override
 826     public void emitNullCheck(ValueNode v, DeoptimizingNode deopting) {
 827         assert v.kind() == Kind.Object;
 828         Variable obj = newVariable(Kind.Object);
 829         emitMove(obj, operand(v));
 830         append(new HSAILMove.NullCheckOp(obj, state(deopting)));
 831     }
 832 
 833     @Override
 834     public void visitInfopointNode(InfopointNode i) {
 835         throw GraalInternalError.unimplemented();
 836     }
 837 
 838 }