public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: dengjianbo <dengjianbo@loongson.cn>,
	adhemerval.zanella@linaro.org,  libc-alpha@sourceware.org,
	i.swmail@xen0n.name
Cc: xuchenghua@loongson.cn, joseph_myers@mentor.com, caiyinyu@loongson.cn
Subject: Re: [PATCH 1/1] LoongArch: Add optimized functions.
Date: Fri, 02 Sep 2022 17:35:38 +0800	[thread overview]
Message-ID: <9051986d0096cb1d0de15b4925e5a744eaf2b81b.camel@xry111.site> (raw)
In-Reply-To: <20220902083908.2560918-2-dengjianbo@loongson.cn>

I've not really run the code, see below for some comments after a quick
view.

On Fri, 2022-09-02 at 16:39 +0800, dengjianbo wrote:

/* snip */

What is "ANDROID_CHANGES"?  I can't find anything in Glibc building
system defining it and AFAIK Android is using another libc
implementation (I can't remember the name, but I'm sure it's not Glibc).

> +#ifdef ANDROID_CHANGES
> +LEAF(MEMMOVE_NAME, 0)
> +#else
> +LEAF(MEMMOVE_NAME)

/* snip */

> +start_unalign_proc:
> +       pcaddi          t1, 18
> +       slli.d          a6, a7, 3
> +       add.d           t1, t1, a6
> +       jirl            zero, t1, 0

"jr t1", to make the expression of all "jump register" operations
consistent.  Likewise for all "jirl zero, [something], 0".

> +end:
> +       move            v0, t8
> +       jr              ra

Do not use MIPS-style v0 or v1 aliases.  They mislead people to believe
"v0" was a different register than "a0".

/* snip */

> +#define L_ADDIU        addi.d
> +#define L_ADDU add.d
> +#define L_SUBU sub.d

Do not use MIPS-style "U" suffix.  LoongArch is not so MIPS-similar (we
don't have some "signaling arithmetic") and you don't want others to
believe so, do you? :)

> +LEAF(STRCHR)
> +       .align          6

Hmm, any rational to force a 64-byte alignment here?


-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2022-09-02  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02  8:39 [PATCH 0/1] " dengjianbo
2022-09-02  8:39 ` [PATCH 1/1] " dengjianbo
2022-09-02  9:35   ` Xi Ruoyao [this message]
2022-09-02  9:52     ` Xi Ruoyao
2022-09-16  7:34     ` dengjianbo
2022-09-16  7:16 [PATCH 0/1] " dengjianbo
2022-09-16  7:16 ` [PATCH 1/1] " 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=9051986d0096cb1d0de15b4925e5a744eaf2b81b.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=adhemerval.zanella@linaro.org \
    --cc=caiyinyu@loongson.cn \
    --cc=dengjianbo@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=joseph_myers@mentor.com \
    --cc=libc-alpha@sourceware.org \
    --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).