Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AArch64: Stop saving/restoring x29 in unnecessary cases #18248

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

knn-k
Copy link
Contributor

@knn-k knn-k commented Oct 6, 2023

This commit introduces SAVE_LR and RESTORE_LR macros and replaces some of SAVE_FPLR and RESTORE_FPLR.
FP (x29) register is handled by SAVE/RESTORE_PRESERVED_REGS and SAVE_RESTORE_C_NONVOLATILE_REGS.

@knn-k
Copy link
Contributor Author

knn-k commented Oct 6, 2023

Here is the j2iVirtual code, for example. This commit removes str x29, [sp, #648] after stp x28, x29, [x16, #224].

00000000008bbe14 <j2iVirtual>:
  8bbe14:       f9001274        str     x20, [x19, #32]
  8bbe18:       910683f0        add     x16, sp, #0x1a0
  8bbe1c:       f9011bf2        str     x18, [sp, #560]
  8bbe20:       f90127f5        str     x21, [sp, #584]
  8bbe24:       a90b5e16        stp     x22, x23, [x16, #176]
  8bbe28:       a90c6618        stp     x24, x25, [x16, #192]
  8bbe2c:       a90d6e1a        stp     x26, x27, [x16, #208]
  8bbe30:       a90e761c        stp     x28, x29, [x16, #224] <- FP (x29) is saved at x16+232 = sp+648
  8bbe34:       f90147fd        str     x29, [sp, #648] <- This instruction can be removed
  8bbe38:       f9014bfe        str     x30, [sp, #656]
  8bbe3c:       f9007a69        str     x9, [x19, #240]
  8bbe40:       aa0003e1        mov     x1, x0
  8bbe44:       d28001a0        mov     x0, #0xd                        // #13
  8bbe48:       17ffff34        b       8bbb18 <cInterpreterFromJIT>

@knn-k knn-k requested a review from 0xdaryl October 16, 2023 02:38
This commit introduces SAVE_LR and RESTORE_LR macros and replaces some
of SAVE_FPLR and RESTORE_FPLR.
FP (x29) register is handled by SAVE/RESTORE_PRESERVED_REGS and
SAVE_RESTORE_C_NONVOLATILE_REGS.

Signed-off-by: KONNO Kazuhiro <[email protected]>
@0xdaryl
Copy link
Contributor

0xdaryl commented Oct 19, 2023

Code looks good. Minor nit: can you fix the spelling of "unnecessary" in your commit title please?

@0xdaryl 0xdaryl self-assigned this Oct 19, 2023
@0xdaryl
Copy link
Contributor

0xdaryl commented Oct 19, 2023

Jenkins test sanity alinux jdk17

@knn-k knn-k changed the title AArch64: Stop saving/restoring x29 in unnnecessary cases AArch64: Stop saving/restoring x29 in unnecessary cases Oct 19, 2023
@knn-k
Copy link
Contributor Author

knn-k commented Oct 19, 2023

Fixed the commit title. Re-running the test.

@knn-k
Copy link
Contributor Author

knn-k commented Oct 19, 2023

Jenkins test sanity alinux jdk17

@0xdaryl 0xdaryl merged commit 43d41d5 into eclipse-openj9:master Oct 20, 2023
@knn-k knn-k deleted the aarch64saveLR branch October 20, 2023 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants