Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @ 6084:6759698e3140
7133857: exp() and pow() should use the x87 ISA on x86
Summary: use x87 instructions to implement exp() and pow() in interpreter/c1/c2.
Reviewed-by: kvn, never, twisti
author | roland |
---|---|
date | Tue, 15 May 2012 10:10:23 +0200 |
parents | 5cceda753a4a |
children | 8b0a4867acf0 |
comparison
equal
deleted
inserted
replaced
6057:8f972594effc | 6084:6759698e3140 |
---|---|
736 } | 736 } |
737 case vmIntrinsics::_dlog10: // fall through | 737 case vmIntrinsics::_dlog10: // fall through |
738 case vmIntrinsics::_dlog: // fall through | 738 case vmIntrinsics::_dlog: // fall through |
739 case vmIntrinsics::_dsin: // fall through | 739 case vmIntrinsics::_dsin: // fall through |
740 case vmIntrinsics::_dtan: // fall through | 740 case vmIntrinsics::_dtan: // fall through |
741 case vmIntrinsics::_dcos: { | 741 case vmIntrinsics::_dcos: // fall through |
742 case vmIntrinsics::_dexp: { | |
742 assert(x->number_of_arguments() == 1, "wrong type"); | 743 assert(x->number_of_arguments() == 1, "wrong type"); |
743 | 744 |
744 address runtime_entry = NULL; | 745 address runtime_entry = NULL; |
745 switch (x->id()) { | 746 switch (x->id()) { |
746 case vmIntrinsics::_dsin: | 747 case vmIntrinsics::_dsin: |
756 runtime_entry = CAST_FROM_FN_PTR(address, SharedRuntime::dlog); | 757 runtime_entry = CAST_FROM_FN_PTR(address, SharedRuntime::dlog); |
757 break; | 758 break; |
758 case vmIntrinsics::_dlog10: | 759 case vmIntrinsics::_dlog10: |
759 runtime_entry = CAST_FROM_FN_PTR(address, SharedRuntime::dlog10); | 760 runtime_entry = CAST_FROM_FN_PTR(address, SharedRuntime::dlog10); |
760 break; | 761 break; |
762 case vmIntrinsics::_dexp: | |
763 runtime_entry = CAST_FROM_FN_PTR(address, SharedRuntime::dexp); | |
764 break; | |
761 default: | 765 default: |
762 ShouldNotReachHere(); | 766 ShouldNotReachHere(); |
763 } | 767 } |
764 | 768 |
765 LIR_Opr result = call_runtime(x->argument_at(0), runtime_entry, x->type(), NULL); | 769 LIR_Opr result = call_runtime(x->argument_at(0), runtime_entry, x->type(), NULL); |
766 set_result(x, result); | 770 set_result(x, result); |
771 break; | |
772 } | |
773 case vmIntrinsics::_dpow: { | |
774 assert(x->number_of_arguments() == 2, "wrong type"); | |
775 address runtime_entry = CAST_FROM_FN_PTR(address, SharedRuntime::dpow); | |
776 LIR_Opr result = call_runtime(x->argument_at(0), x->argument_at(1), runtime_entry, x->type(), NULL); | |
777 set_result(x, result); | |
778 break; | |
767 } | 779 } |
768 } | 780 } |
769 } | 781 } |
770 | 782 |
771 | 783 |