Skip to content

Commit

Permalink
8282231: x86-32: runtime call to SharedRuntime::ldiv corrupts registers
Browse files Browse the repository at this point in the history
Backport-of: ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73
  • Loading branch information
TheRealMDoerr committed Mar 31, 2022
1 parent 789b4a9 commit 893d586
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/hotspot/cpu/x86/x86_32.ad
@@ -1,5 +1,5 @@
//
// Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
//
// This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -7810,9 +7810,9 @@ instruct divI_eReg(eAXRegI rax, eDXRegI rdx, eCXRegI div, eFlagsReg cr) %{
%}

// Divide Register Long
instruct divL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
instruct divL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
match(Set dst (DivL src1 src2));
effect( KILL cr, KILL cx, KILL bx );
effect(CALL);
ins_cost(10000);
format %{ "PUSH $src1.hi\n\t"
"PUSH $src1.lo\n\t"
Expand Down Expand Up @@ -7858,9 +7858,9 @@ instruct modI_eReg(eDXRegI rdx, eAXRegI rax, eCXRegI div, eFlagsReg cr) %{
%}

// Remainder Register Long
instruct modL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
instruct modL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
match(Set dst (ModL src1 src2));
effect( KILL cr, KILL cx, KILL bx );
effect(CALL);
ins_cost(10000);
format %{ "PUSH $src1.hi\n\t"
"PUSH $src1.lo\n\t"
Expand Down

1 comment on commit 893d586

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.