Mercurial > hg > truffle
comparison graal/com.oracle.graal.asm.sparc/src/com/oracle/graal/asm/sparc/SPARCAssembler.java @ 21543:93c50cefb9e8
moved GraalInternalError to com.oracle.jvmci.common and renamed it to JVMCIError (JBS:GRAAL-53)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 25 May 2015 23:30:34 +0200 |
parents | b4b103d7f46f |
children | 48c1ebd24120 |
comparison
equal
deleted
inserted
replaced
21542:543957c1c6a6 | 21543:93c50cefb9e8 |
---|---|
32 import static java.lang.String.*; | 32 import static java.lang.String.*; |
33 | 33 |
34 import com.oracle.graal.api.code.*; | 34 import com.oracle.graal.api.code.*; |
35 import com.oracle.graal.api.meta.*; | 35 import com.oracle.graal.api.meta.*; |
36 import com.oracle.graal.asm.*; | 36 import com.oracle.graal.asm.*; |
37 import com.oracle.graal.compiler.common.*; | |
38 import com.oracle.graal.compiler.common.calc.*; | 37 import com.oracle.graal.compiler.common.calc.*; |
39 import com.oracle.graal.sparc.*; | 38 import com.oracle.graal.sparc.*; |
40 import com.oracle.graal.sparc.SPARC.CPUFeature; | 39 import com.oracle.graal.sparc.SPARC.CPUFeature; |
40 import com.oracle.jvmci.common.*; | |
41 | 41 |
42 /** | 42 /** |
43 * This class implements an assembler that can encode most SPARC instructions. | 43 * This class implements an assembler that can encode most SPARC instructions. |
44 */ | 44 */ |
45 public abstract class SPARCAssembler extends Assembler { | 45 public abstract class SPARCAssembler extends Assembler { |
578 } else if (isInt) { | 578 } else if (isInt) { |
579 return Icc; | 579 return Icc; |
580 } else if (isFloat) { | 580 } else if (isFloat) { |
581 return Fcc0; | 581 return Fcc0; |
582 } else { | 582 } else { |
583 throw GraalInternalError.shouldNotReachHere(); | 583 throw JVMCIError.shouldNotReachHere(); |
584 } | 584 } |
585 } | 585 } |
586 } | 586 } |
587 | 587 |
588 public enum ConditionFlag { | 588 public enum ConditionFlag { |
694 case Negative : return Positive; | 694 case Negative : return Positive; |
695 case Positive : return Negative; | 695 case Positive : return Negative; |
696 case OverflowSet : return OverflowClear; | 696 case OverflowSet : return OverflowClear; |
697 case OverflowClear : return OverflowSet; | 697 case OverflowClear : return OverflowSet; |
698 default: | 698 default: |
699 GraalInternalError.unimplemented(); | 699 JVMCIError.unimplemented(); |
700 } | 700 } |
701 //@formatter:on | 701 //@formatter:on |
702 return null; | 702 return null; |
703 } | 703 } |
704 | 704 |
751 case AT: | 751 case AT: |
752 return GreaterUnsigned; | 752 return GreaterUnsigned; |
753 case GT: | 753 case GT: |
754 return Greater; | 754 return Greater; |
755 } | 755 } |
756 throw GraalInternalError.shouldNotReachHere("Unimplemented for: " + cond); | 756 throw JVMCIError.shouldNotReachHere("Unimplemented for: " + cond); |
757 case Fcc0: | 757 case Fcc0: |
758 case Fcc1: | 758 case Fcc1: |
759 case Fcc2: | 759 case Fcc2: |
760 case Fcc3: | 760 case Fcc3: |
761 switch (cond) { | 761 switch (cond) { |
770 case GE: | 770 case GE: |
771 return unorderedIsTrue ? F_UnorderedGreaterOrEqual : F_GreaterOrEqual; | 771 return unorderedIsTrue ? F_UnorderedGreaterOrEqual : F_GreaterOrEqual; |
772 case GT: | 772 case GT: |
773 return unorderedIsTrue ? F_UnorderedOrGreater : F_Greater; | 773 return unorderedIsTrue ? F_UnorderedOrGreater : F_Greater; |
774 } | 774 } |
775 throw GraalInternalError.shouldNotReachHere("Unkown condition: " + cond); | 775 throw JVMCIError.shouldNotReachHere("Unkown condition: " + cond); |
776 } | 776 } |
777 throw GraalInternalError.shouldNotReachHere("Unknown condition flag register " + conditionFlagsRegister); | 777 throw JVMCIError.shouldNotReachHere("Unknown condition flag register " + conditionFlagsRegister); |
778 } | 778 } |
779 } | 779 } |
780 | 780 |
781 public enum RCondition { | 781 public enum RCondition { |
782 // @formatter:off | 782 // @formatter:off |