Skip to content

Commit 422020c

Browse files
committedJan 29, 2024
8210858: AArch64: remove Math.log intrinsic
Reviewed-by: ngasson, shade
1 parent 0d5f5e1 commit 422020c

4 files changed

+5
-400
lines changed
 

‎src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -831,18 +831,12 @@ void LIRGenerator::do_LibmIntrinsic(Intrinsic* x) {
831831
}
832832
break;
833833
case vmIntrinsics::_dlog:
834-
if (StubRoutines::dlog() != nullptr) {
835-
__ call_runtime_leaf(StubRoutines::dlog(), getThreadTemp(), result_reg, cc->args());
836-
} else {
837-
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
838-
}
834+
// Math.log intrinsic is not implemented on AArch64 (see JDK-8210858),
835+
// but we can still call the shared runtime.
836+
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog), getThreadTemp(), result_reg, cc->args());
839837
break;
840838
case vmIntrinsics::_dlog10:
841-
if (StubRoutines::dlog10() != nullptr) {
842-
__ call_runtime_leaf(StubRoutines::dlog10(), getThreadTemp(), result_reg, cc->args());
843-
} else {
844-
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
845-
}
839+
__ call_runtime_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dlog10), getThreadTemp(), result_reg, cc->args());
846840
break;
847841
case vmIntrinsics::_dpow:
848842
if (StubRoutines::dpow() != nullptr) {

‎src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp

-5
Original file line numberDiff line numberDiff line change
@@ -1425,11 +1425,6 @@ class MacroAssembler: public Assembler {
14251425
FloatRegister vtmp2, FloatRegister vtmp3,
14261426
FloatRegister vtmp4, FloatRegister vtmp5);
14271427

1428-
void fast_log(FloatRegister vtmp0, FloatRegister vtmp1, FloatRegister vtmp2,
1429-
FloatRegister vtmp3, FloatRegister vtmp4, FloatRegister vtmp5,
1430-
FloatRegister tmpC1, FloatRegister tmpC2, FloatRegister tmpC3,
1431-
FloatRegister tmpC4, Register tmp1, Register tmp2,
1432-
Register tmp3, Register tmp4, Register tmp5);
14331428
void generate_dsin_dcos(bool isCos, address npio2_hw, address two_over_pi,
14341429
address pio2, address dsin_coef, address dcos_coef);
14351430
private:

0 commit comments

Comments
 (0)
Please sign in to comment.