diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-03-10 17:22:45 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-03-10 17:22:45 +0000 |
commit | 821e7ed167f11f482d2d1a8eaf114a667295a581 (patch) | |
tree | 0129168d8340a3aed46ed4803ac83eec0fafea86 /target/tilegx/simd_helper.c | |
parent | 5c6295a45b4fceac913c11abc62488c49c02b9fd (diff) | |
parent | 65a9d3807e9a0ffd9f9719416a07be41b6f39e94 (diff) | |
download | qemu-821e7ed167f11f482d2d1a8eaf114a667295a581.zip qemu-821e7ed167f11f482d2d1a8eaf114a667295a581.tar.gz qemu-821e7ed167f11f482d2d1a8eaf114a667295a581.tar.bz2 |
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-03-09' into staging
* Add some missing gitlab-CI job dependencies
* Re-enable "make check SPEED=slow"
* Improve the gitlab-pipeline-status script
* Clean up inclusing of qtest.h headers
* Improve libqos/qgraph documentation
* Fix downloading problem in the acceptance tests
* Remove deprecated target tilegx
* Add new bsd-user maintainers
# gpg: Signature made Tue 09 Mar 2021 10:27:29 GMT
# gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/thuth-gitlab/tags/pull-request-2021-03-09:
bsd-user: Add new maintainers
Remove deprecated target tilegx
Acceptance Tests: restore filtering of tests by target arch
Acceptance Tests: restore downloading of VM images
docs/devel/qgraph: improve qgraph documentation
libqos/qgraph: format qgraph comments for sphinx documentation
scripts/ci/gitlab-pipeline-status: give more info when pipeline not found
scripts/ci/gitlab-pipeline-status: give more information on failures
scripts/ci/gitlab-pipeline-status: split utlity function for HTTP GET
meson: Re-enable the possibility to run "make check SPEED=slow"
docker: OpenSBI build job depends on OpenSBI container
docker: EDK2 build job depends on EDK2 container
docker: Alpine build job depends on Alpine container
qtest: delete superfluous inclusions of qtest.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/tilegx/simd_helper.c')
-rw-r--r-- | target/tilegx/simd_helper.c | 165 |
1 files changed, 0 insertions, 165 deletions
diff --git a/target/tilegx/simd_helper.c b/target/tilegx/simd_helper.c deleted file mode 100644 index 0fdfad2..0000000 --- a/target/tilegx/simd_helper.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * QEMU TILE-Gx helpers - * - * Copyright (c) 2015 Chen Gang - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see - * <http://www.gnu.org/licenses/lgpl-2.1.html> - */ - -#include "qemu/osdep.h" -#include "cpu.h" -#include "exec/helper-proto.h" - - -/* Broadcast a value to all elements of a vector. */ -#define V1(X) (((X) & 0xff) * 0x0101010101010101ull) -#define V2(X) (((X) & 0xffff) * 0x0001000100010001ull) - - -uint64_t helper_v1multu(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - for (i = 0; i < 64; i += 8) { - unsigned ae = extract64(a, i, 8); - unsigned be = extract64(b, i, 8); - r = deposit64(r, i, 8, ae * be); - } - return r; -} - -uint64_t helper_v2mults(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - /* While the instruction talks about signed inputs, with a - truncated result the sign of the inputs doesn't matter. */ - for (i = 0; i < 64; i += 16) { - unsigned ae = extract64(a, i, 16); - unsigned be = extract64(b, i, 16); - r = deposit64(r, i, 16, ae * be); - } - return r; -} - -uint64_t helper_v1shl(uint64_t a, uint64_t b) -{ - uint64_t m; - - b &= 7; - m = V1(0xff >> b); - return (a & m) << b; -} - -uint64_t helper_v2shl(uint64_t a, uint64_t b) -{ - uint64_t m; - - b &= 15; - m = V2(0xffff >> b); - return (a & m) << b; -} - -uint64_t helper_v1shru(uint64_t a, uint64_t b) -{ - uint64_t m; - - b &= 7; - m = V1(0xff << b); - return (a & m) >> b; -} - -uint64_t helper_v2shru(uint64_t a, uint64_t b) -{ - uint64_t m; - - b &= 15; - m = V2(0xffff << b); - return (a & m) >> b; -} - -uint64_t helper_v1shrs(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - b &= 7; - for (i = 0; i < 64; i += 8) { - r = deposit64(r, i, 8, sextract64(a, i + b, 8 - b)); - } - return r; -} - -uint64_t helper_v2shrs(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - b &= 15; - for (i = 0; i < 64; i += 16) { - r = deposit64(r, i, 16, sextract64(a, i + b, 16 - b)); - } - return r; -} - -uint64_t helper_v1int_h(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - for (i = 0; i < 32; i += 8) { - r = deposit64(r, 2 * i + 8, 8, extract64(a, i + 32, 8)); - r = deposit64(r, 2 * i, 8, extract64(b, i + 32, 8)); - } - return r; -} - -uint64_t helper_v1int_l(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - for (i = 0; i < 32; i += 8) { - r = deposit64(r, 2 * i + 8, 8, extract64(a, i, 8)); - r = deposit64(r, 2 * i, 8, extract64(b, i, 8)); - } - return r; -} - -uint64_t helper_v2int_h(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - for (i = 0; i < 32; i += 16) { - r = deposit64(r, 2 * i + 16, 16, extract64(a, i + 32, 16)); - r = deposit64(r, 2 * i, 16, extract64(b, i + 32, 16)); - } - return r; -} - -uint64_t helper_v2int_l(uint64_t a, uint64_t b) -{ - uint64_t r = 0; - int i; - - for (i = 0; i < 32; i += 16) { - r = deposit64(r, 2 * i + 16, 16, extract64(a, i, 16)); - r = deposit64(r, 2 * i, 16, extract64(b, i, 16)); - } - return r; -} |