Skip to content

Commit

Permalink
8311862: RISC-V: small improvements to shift immediate instructions
Browse files Browse the repository at this point in the history
Reviewed-by: luhenry, fjiang, fyang
  • Loading branch information
Ilya Gavrilin authored and Vladimir Kempik committed Jul 14, 2023
1 parent a63f865 commit f3b96f6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/hotspot/cpu/riscv/assembler_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2787,7 +2787,13 @@ enum Nf {
c_slli(Rd, shamt); \
return; \
} \
_slli(Rd, Rs1, shamt); \
if (shamt != 0) { \
_slli(Rd, Rs1, shamt); \
} else { \
if (Rd != Rs1) { \
addi(Rd, Rs1, 0); \
} \
} \
}

INSN(slli);
Expand All @@ -2802,7 +2808,13 @@ enum Nf {
C_NAME(Rd, shamt); \
return; \
} \
NORMAL_NAME(Rd, Rs1, shamt); \
if (shamt != 0) { \
NORMAL_NAME(Rd, Rs1, shamt); \
} else { \
if (Rd != Rs1) { \
addi(Rd, Rs1, 0); \
} \
} \
}

INSN(srai, c_srai, _srai);
Expand Down

5 comments on commit f3b96f6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@VladimirKempik
Copy link

Choose a reason for hiding this comment

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

/backport jdk21u

@VladimirKempik
Copy link

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 f3b96f6 Jul 14, 2023

Choose a reason for hiding this comment

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

@VladimirKempik the backport was successfully created on the branch VladimirKempik-backport-f3b96f69 in my personal fork of openjdk/jdk21u. To create a pull request with this backport targeting openjdk/jdk21u: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 f3b96f69 from the openjdk/jdk repository.

The commit being backported was authored by Ilya Gavrilin on 14 Jul 2023 and was reviewed by Ludovic Henry, Feilong Jiang and Fei Yang.

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/jdk21u:

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

@openjdk
Copy link

@openjdk openjdk bot commented on f3b96f6 Jul 14, 2023

Choose a reason for hiding this comment

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

@VladimirKempik the backport was successfully created on the branch VladimirKempik-backport-f3b96f69 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 f3b96f69 from the openjdk/jdk repository.

The commit being backported was authored by Ilya Gavrilin on 14 Jul 2023 and was reviewed by Ludovic Henry, Feilong Jiang and Fei Yang.

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.git VladimirKempik-backport-f3b96f69:VladimirKempik-backport-f3b96f69
$ git checkout VladimirKempik-backport-f3b96f69
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git VladimirKempik-backport-f3b96f69

Please sign in to comment.