659 throw GraalError.shouldNotReachHere("BenchmarkCounters are not enabled!"); 660 } 661 662 @Override 663 public LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments) { 664 if (BenchmarkCounters.enabled) { 665 return new AMD64HotSpotCounterOp(names, groups, increments, getProviders().getRegisters(), config, getOrInitRescueSlot()); 666 } 667 throw GraalError.shouldNotReachHere("BenchmarkCounters are not enabled!"); 668 } 669 670 @Override 671 public void emitPrefetchAllocate(Value address) { 672 append(new AMD64PrefetchOp(asAddressValue(address), config.allocatePrefetchInstr)); 673 } 674 675 @Override 676 protected StrategySwitchOp createStrategySwitchOp(SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, Variable key, AllocatableValue temp) { 677 return new AMD64HotSpotStrategySwitchOp(strategy, keyTargets, defaultTarget, key, temp); 678 } 679 680 @Override 681 public ForeignCallLinkage lookupArrayEqualsStub(JavaKind kind, int constantLength) { 682 if (constantLength >= 0 && constantLength * kind.getByteCount() < 2 * getMaxVectorSize()) { 683 // Yield constant-length arrays comparison assembly 684 return null; 685 } 686 switch (kind) { 687 case Boolean: 688 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_BOOLEAN_ARRAY_EQUALS); 689 case Byte: 690 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_BYTE_ARRAY_EQUALS); 691 case Char: 692 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_CHAR_ARRAY_EQUALS); 693 case Short: 694 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_SHORT_ARRAY_EQUALS); 695 case Int: 696 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_INT_ARRAY_EQUALS); 697 case Long: 698 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_LONG_ARRAY_EQUALS); 699 case Float: 700 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_FLOAT_ARRAY_EQUALS); 701 case Double: 702 return getForeignCalls().lookupForeignCall(AMD64ArrayEqualsStub.STUB_DOUBLE_ARRAY_EQUALS); 703 default: 704 return null; 705 } 706 } 707 } | 659 throw GraalError.shouldNotReachHere("BenchmarkCounters are not enabled!"); 660 } 661 662 @Override 663 public LIRInstruction createMultiBenchmarkCounter(String[] names, String[] groups, Value[] increments) { 664 if (BenchmarkCounters.enabled) { 665 return new AMD64HotSpotCounterOp(names, groups, increments, getProviders().getRegisters(), config, getOrInitRescueSlot()); 666 } 667 throw GraalError.shouldNotReachHere("BenchmarkCounters are not enabled!"); 668 } 669 670 @Override 671 public void emitPrefetchAllocate(Value address) { 672 append(new AMD64PrefetchOp(asAddressValue(address), config.allocatePrefetchInstr)); 673 } 674 675 @Override 676 protected StrategySwitchOp createStrategySwitchOp(SwitchStrategy strategy, LabelRef[] keyTargets, LabelRef defaultTarget, Variable key, AllocatableValue temp) { 677 return new AMD64HotSpotStrategySwitchOp(strategy, keyTargets, defaultTarget, key, temp); 678 } 679 } |