From: Paolo Bonzini <pbonzini@redhat.com>
To: Artyom Tarasenko <atar4qemu@gmail.com>,
qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>,
Peter Lieven <pl@kamp.de>
Subject: Re: [Qemu-devel] [PATCH] cutils: fix compiling with icc
Date: Mon, 22 Jun 2015 18:23:07 +0200 [thread overview]
Message-ID: <5588366B.4040401@redhat.com> (raw)
In-Reply-To: <6fd2cd15902fabc2a76bab10789434aa94db0427.1434987161.git.atar4qemu@gmail.com>
On 22/06/2015 18:11, Artyom Tarasenko wrote:
> Intel C Compiler version 15.0.3.187 Build 20150407 doesn't support
> '|' function for non floating-point simd operands.
> Use instead _mm_or_si128 which is supported both in icc and gcc.
This would work for x86, but not for Altivec or non-SIMD. Please define
a new macro like VEC_OR instead.
Paolo
> Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
> ---
> util/cutils.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/util/cutils.c b/util/cutils.c
> index 144b25c..ffc9ddb 100644
> --- a/util/cutils.c
> +++ b/util/cutils.c
> @@ -207,13 +207,13 @@ size_t buffer_find_nonzero_offset(const void *buf, size_t len)
> for (i = BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR;
> i < len / sizeof(VECTYPE);
> i += BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR) {
> - VECTYPE tmp0 = p[i + 0] | p[i + 1];
> - VECTYPE tmp1 = p[i + 2] | p[i + 3];
> - VECTYPE tmp2 = p[i + 4] | p[i + 5];
> - VECTYPE tmp3 = p[i + 6] | p[i + 7];
> - VECTYPE tmp01 = tmp0 | tmp1;
> - VECTYPE tmp23 = tmp2 | tmp3;
> - if (!ALL_EQ(tmp01 | tmp23, zero)) {
> + VECTYPE tmp0 = _mm_or_si128(p[i + 0], p[i + 1]);
> + VECTYPE tmp1 = _mm_or_si128(p[i + 2], p[i + 3]);
> + VECTYPE tmp2 = _mm_or_si128(p[i + 4], p[i + 5]);
> + VECTYPE tmp3 = _mm_or_si128(p[i + 6], p[i + 7]);
> + VECTYPE tmp01 = _mm_or_si128(tmp0, tmp1);
> + VECTYPE tmp23 = _mm_or_si128(tmp2, tmp3);
> + if (!ALL_EQ(_mm_or_si128(tmp01, tmp23), zero)) {
> break;
> }
prev parent reply other threads:[~2015-06-22 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 16:11 [Qemu-devel] [PATCH] cutils: fix compiling with icc Artyom Tarasenko
2015-06-22 16:23 ` Paolo Bonzini [this message]
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=5588366B.4040401@redhat.com \
--to=pbonzini@redhat.com \
--cc=atar4qemu@gmail.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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.