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
Reviewed-by: shade, jiefu
  • Loading branch information
Andrew Haley committed Feb 23, 2022
1 parent 378fa50 commit ecd85e6
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 @@ -7825,9 +7825,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 @@ -7873,9 +7873,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

7 comments on commit ecd85e6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@TheRealMDoerr
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ecd85e6 Mar 29, 2022

Choose a reason for hiding this comment

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

@TheRealMDoerr the backport was successfully created on the branch TheRealMDoerr-backport-ecd85e6f in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit ecd85e6f from the openjdk/jdk repository.

The commit being backported was authored by Andrew Haley on 23 Feb 2022 and was reviewed by Aleksey Shipilev and Jie Fu.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev TheRealMDoerr-backport-ecd85e6f:TheRealMDoerr-backport-ecd85e6f
$ git checkout TheRealMDoerr-backport-ecd85e6f
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev TheRealMDoerr-backport-ecd85e6f

@gnu-andrew
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ecd85e6 Apr 5, 2022

Choose a reason for hiding this comment

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

@gnu-andrew Could not automatically backport ecd85e6f to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/hotspot/cpu/x86/x86_32.ad

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u-dev:

$ git checkout -b gnu-andrew-backport-ecd85e6f
$ git fetch --no-tags https://git.openjdk.java.net/jdk ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73
$ git cherry-pick --no-commit ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73.

@gnu-andrew
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk15u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on ecd85e6 Apr 8, 2022

Choose a reason for hiding this comment

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

@gnu-andrew Could not automatically backport ecd85e6f to openjdk/jdk15u-dev due to conflicts in the following files:

  • src/hotspot/cpu/x86/x86_32.ad

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk15u-dev:

$ git checkout -b gnu-andrew-backport-ecd85e6f
$ git fetch --no-tags https://git.openjdk.java.net/jdk ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73
$ git cherry-pick --no-commit ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk15u-dev with the title Backport ecd85e6f0f8906ad1e8aa0a53bf499e8c969ba73.

Please sign in to comment.