From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>, Alan Modra <amodra@gmail.com>
Subject: [RFC PATCH 1/9] crypto: powerpc - Use address generation helper for asm
Date: Tue, 27 Dec 2022 19:26:01 +1000 [thread overview]
Message-ID: <20221227092609.2078908-2-npiggin@gmail.com> (raw)
In-Reply-To: <20221227092609.2078908-1-npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/crypto/crc32-vpmsum_core.S | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/crypto/crc32-vpmsum_core.S b/arch/powerpc/crypto/crc32-vpmsum_core.S
index a16a717c809c..b0f87f595b26 100644
--- a/arch/powerpc/crypto/crc32-vpmsum_core.S
+++ b/arch/powerpc/crypto/crc32-vpmsum_core.S
@@ -113,9 +113,7 @@ FUNC_START(CRC_FUNCTION_NAME)
#endif
#ifdef BYTESWAP_DATA
- addis r3,r2,.byteswap_constant@toc@ha
- addi r3,r3,.byteswap_constant@toc@l
-
+ LOAD_REG_ADDR(r3, .byteswap_constant)
lvx byteswap,0,r3
addi r3,r3,16
#endif
@@ -150,8 +148,7 @@ FUNC_START(CRC_FUNCTION_NAME)
addi r7,r7,-1
mtctr r7
- addis r3,r2,.constants@toc@ha
- addi r3,r3,.constants@toc@l
+ LOAD_REG_ADDR(r3, .constants)
/* Find the start of our constants */
add r3,r3,r8
@@ -506,8 +503,7 @@ FUNC_START(CRC_FUNCTION_NAME)
.Lbarrett_reduction:
/* Barrett constants */
- addis r3,r2,.barrett_constants@toc@ha
- addi r3,r3,.barrett_constants@toc@l
+ LOAD_REG_ADDR(r3, .barrett_constants)
lvx const1,0,r3
lvx const2,off16,r3
@@ -610,8 +606,7 @@ FUNC_START(CRC_FUNCTION_NAME)
cmpdi r5,0
beq .Lzero
- addis r3,r2,.short_constants@toc@ha
- addi r3,r3,.short_constants@toc@l
+ LOAD_REG_ADDR(r3, .short_constants)
/* Calculate where in the constant table we need to start */
subfic r6,r5,256
--
2.37.2
next prev parent reply other threads:[~2022-12-27 9:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-27 9:26 [RFC PATCH 0/9] powerpc/64: Build with PC-Relative addressing Nicholas Piggin
2022-12-27 9:26 ` Nicholas Piggin [this message]
2022-12-27 9:26 ` [RFC PATCH 2/9] powerpc/64s: Refactor initialisation after prom Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 3/9] powerpc/64e: Simplify address calculation in secondary hold loop Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 4/9] powerpc/64: Move initial base and TOC pointer calculation Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 5/9] powerpc/64s: Run at the kernel virtual address earlier in boot Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 6/9] powerpc: add CFUNC assembly label annotation Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 7/9] powerpc/64: Add support to build with prefixed instructions Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 8/9] powerpc/64: vmlinux support building with PCREL addresing Nicholas Piggin
2022-12-27 9:26 ` [RFC PATCH 9/9] powerpc/64: modules " Nicholas Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221227092609.2078908-2-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=amodra@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.