From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
qemu-devel@nongnu.org
Cc: arikalo@wavecomp.com, amarkovic@wavecomp.com, aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH v5 08/10] tests/tcg: target/mips: Add wrappers for some MIPS64R6 instructions
Date: Sat, 2 Mar 2019 20:20:11 +0100 [thread overview]
Message-ID: <a50c806a-698d-3ebd-824f-284e34af8476@redhat.com> (raw)
In-Reply-To: <1551467914-11209-9-git-send-email-aleksandar.markovic@rt-rk.com>
On 3/1/19 8:18 PM, Aleksandar Markovic wrote:
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> Add wrappers for some MIPS64R6 instructions.
>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
> tests/tcg/mips/include/wrappers_mips64r6.h | 64 ++++++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
> create mode 100644 tests/tcg/mips/include/wrappers_mips64r6.h
>
> diff --git a/tests/tcg/mips/include/wrappers_mips64r6.h b/tests/tcg/mips/include/wrappers_mips64r6.h
> new file mode 100644
> index 0000000..c9c34aa
> --- /dev/null
> +++ b/tests/tcg/mips/include/wrappers_mips64r6.h
> @@ -0,0 +1,64 @@
> +/*
> + * Header file for wrappers around MIPS64R6 instructions assembler
> + * invocations
> + *
> + * Copyright (C) 2019 Wave Computing, Inc.
> + * Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
> + *
> + * This program is free software: you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation, either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program. If not, see <https://www.gnu.org/licenses/>.
> + *
> + */
> +
> +#ifndef WRAPPERS_MIPS64R6_H
> +#define WRAPPERS_MIPS64R6_H
> +
> +
> +#define DO_MIPS64R6__RD__RS(suffix, mnemonic) \
> +static inline void do_mips64r6_##suffix(void *input, void *output) \
'const void *input'
> +{ \
> + __asm__ volatile ( \
> + "ld $t1, 0(%0)\n\t" \
> + #mnemonic " $t0, $t1\n\t" \
> + "sd $t0, 0(%1)\n\t" \
> + : \
> + : "r" (input), "r" (output) \
> + : "t0", "t1", "memory" \
> + ); \
> +}
> +
> +DO_MIPS64R6__RD__RS(DCLO, dclo)
> +DO_MIPS64R6__RD__RS(DCLZ, dclz)
> +DO_MIPS64R6__RD__RS(BITSWAP, bitswap)
> +DO_MIPS64R6__RD__RS(DBITSWAP, dbitswap)
> +
> +
> +#define DO_MIPS64R6__RD__RS_RT(suffix, mnemonic) \
> +static inline void do_mips64r6_##suffix(void *input1, void *input2, \
'const void *input1, const void *input2'
> + void *output) \
> +{ \
> + __asm__ volatile ( \
> + "ld $t1, 0(%0)\n\t" \
> + "ld $t2, 0(%1)\n\t" \
> + #mnemonic " $t0, $t1, $t2\n\t" \
> + "sd $t0, 0(%2)\n\t" \
> + : \
> + : "r" (input1), "r" (input2), "r" (output) \
> + : "t0", "t1", "memory" \
> + ); \
> +}
> +
> +DO_MIPS64R6__RD__RS_RT(DSLLV, dsllv)
> +
> +
> +#endif
>
next prev parent reply other threads:[~2019-03-02 19:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 19:18 [Qemu-devel] [PATCH v5 00/10] Misc target/mips fixes and improvements Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 01/10] disas: nanoMIPS: Correct comments to handlers of some DSP instructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 02/10] tests/tcg: target/mips: Add wrappers for MSA bit set instructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 03/10] tests/tcg: target/mips: Add wrappers for MSA pack nstructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 04/10] tests/tcg: target/mips: Add wrappers for MSA shift instructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 05/10] tests/tcg: target/mips: Add wrappers for MSA bit copy instructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 06/10] tests/tcg: target/mips: Add wrappers for MSA FP max/min instructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 07/10] tests/tcg: target/mips: Add test utilities for 64-bit tests Aleksandar Markovic
2019-03-02 19:18 ` Philippe Mathieu-Daudé
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 08/10] tests/tcg: target/mips: Add wrappers for some MIPS64R6 instructions Aleksandar Markovic
2019-03-02 19:20 ` Philippe Mathieu-Daudé [this message]
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 09/10] tests/tcg: target/mips: Add tests for MIPS64R6 logic instructions Aleksandar Markovic
2019-03-01 19:18 ` [Qemu-devel] [PATCH v5 10/10] tests/tcg: target/mips: Add tests for MIPS64R6 bit swap instructions Aleksandar Markovic
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=a50c806a-698d-3ebd-824f-284e34af8476@redhat.com \
--to=philmd@redhat.com \
--cc=aleksandar.markovic@rt-rk.com \
--cc=amarkovic@wavecomp.com \
--cc=arikalo@wavecomp.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.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 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 NNTP newsgroup(s).