Skip to content

Commit 7b84611

Browse files
committed
8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers
Reviewed-by: mdoerr Backport-of: ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73
1 parent e6ec27e commit 7b84611

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/hotspot/cpu/x86/x86_32.ad

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
33
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
//
55
// This code is free software; you can redistribute it and/or modify it
@@ -7900,9 +7900,9 @@ instruct divI_eReg(eAXRegI rax, eDXRegI rdx, eCXRegI div, eFlagsReg cr) %{
79007900
%}
79017901

79027902
// Divide Register Long
7903-
instruct divL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
7903+
instruct divL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
79047904
match(Set dst (DivL src1 src2));
7905-
effect( KILL cr, KILL cx, KILL bx );
7905+
effect(CALL);
79067906
ins_cost(10000);
79077907
format %{ "PUSH $src1.hi\n\t"
79087908
"PUSH $src1.lo\n\t"
@@ -7948,9 +7948,9 @@ instruct modI_eReg(eDXRegI rdx, eAXRegI rax, eCXRegI div, eFlagsReg cr) %{
79487948
%}
79497949

79507950
// Remainder Register Long
7951-
instruct modL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
7951+
instruct modL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
79527952
match(Set dst (ModL src1 src2));
7953-
effect( KILL cr, KILL cx, KILL bx );
7953+
effect(CALL);
79547954
ins_cost(10000);
79557955
format %{ "PUSH $src1.hi\n\t"
79567956
"PUSH $src1.lo\n\t"

0 commit comments

Comments
 (0)