Skip to content

Commit ecd85e6

Browse files
author
Andrew Haley
committedFeb 23, 2022
8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers
Reviewed-by: shade, jiefu
1 parent 378fa50 commit ecd85e6

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, 2021, 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
@@ -7825,9 +7825,9 @@ instruct divI_eReg(eAXRegI rax, eDXRegI rdx, eCXRegI div, eFlagsReg cr) %{
78257825
%}
78267826

78277827
// Divide Register Long
7828-
instruct divL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
7828+
instruct divL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
78297829
match(Set dst (DivL src1 src2));
7830-
effect( KILL cr, KILL cx, KILL bx );
7830+
effect(CALL);
78317831
ins_cost(10000);
78327832
format %{ "PUSH $src1.hi\n\t"
78337833
"PUSH $src1.lo\n\t"
@@ -7873,9 +7873,9 @@ instruct modI_eReg(eDXRegI rdx, eAXRegI rax, eCXRegI div, eFlagsReg cr) %{
78737873
%}
78747874

78757875
// Remainder Register Long
7876-
instruct modL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
7876+
instruct modL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
78777877
match(Set dst (ModL src1 src2));
7878-
effect( KILL cr, KILL cx, KILL bx );
7878+
effect(CALL);
78797879
ins_cost(10000);
78807880
format %{ "PUSH $src1.hi\n\t"
78817881
"PUSH $src1.lo\n\t"

0 commit comments

Comments
 (0)
Please sign in to comment.