public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: dengjianbo <dengjianbo@loongson.cn>
To: Richard Henderson <richard.henderson@linaro.org>,
	libc-alpha@sourceware.org
Cc: adhemerval.zanella@linaro.org, xry111@xry111.site,
	caiyinyu@loongson.cn, xuchenghua@loongson.cn,
	huangpei@loongson.cn
Subject: Re: [PATCH 3/3] Loongarch: Add ifunc support for strncmp{aligned, lsx}
Date: Tue, 22 Aug 2023 14:37:42 +0800	[thread overview]
Message-ID: <540864c7-ae1f-2358-54d0-41f38ebe43fb@loongson.cn> (raw)
In-Reply-To: <e2964399-7d86-1409-9c89-eac483530abb@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]


On 2023-08-22 11:56, Richard Henderson wrote:
>> +L(magic_num):
>> +    .align          6
>> +    .dword          0x0706050403020100
>> +    .dword          0x0f0e0d0c0b0a0908
>> +ENTRY_NO_ALIGN(STRNCMP)
>> +    beqz            a2, L(ret0)
>> +    pcaddi          t0, -5
>> +    andi            a3, a0, 0xf
>> +    vld             vr2, t0, 0
>
> Why is the data not in .rodata or a mergable constant section?
>
> You can use pcalau12i and %pc_lo12 with vld to place this data anywhere.
>
>
> r~ 

Putting the data here is due to the performance. When the vld
instruction is executed, the data will be in the cache, it can
speed up the data loading.


  reply	other threads:[~2023-08-22  6:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22  2:11 [PATCH 0/3] Add ifunc support for str{nlen, cmp, ncmp} dengjianbo
2023-08-22  2:11 ` [PATCH 1/3] Loongarch: Add ifunc support for strnlen{aligned, lsx, lasx} dengjianbo
2023-08-22  2:11 ` [PATCH 2/3] Loongarch: Add ifunc support for strcmp{aligned, lsx} dengjianbo
2023-08-22  2:11 ` [PATCH 3/3] Loongarch: Add ifunc support for strncmp{aligned, lsx} dengjianbo
2023-08-22  3:56   ` Richard Henderson
2023-08-22  6:37     ` dengjianbo [this message]
2023-08-22 11:13       ` Xi Ruoyao
2023-08-22 11:23         ` Xi Ruoyao
2023-08-23  7:25           ` dengjianbo

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=540864c7-ae1f-2358-54d0-41f38ebe43fb@loongson.cn \
    --to=dengjianbo@loongson.cn \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=huangpei@loongson.cn \
    --cc=libc-alpha@sourceware.org \
    --cc=richard.henderson@linaro.org \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).