summary refs log tree commit diff stats
path: root/target/tilegx/helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-03-10 17:22:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-03-10 17:22:45 +0000
commit821e7ed167f11f482d2d1a8eaf114a667295a581 (patch)
tree0129168d8340a3aed46ed4803ac83eec0fafea86 /target/tilegx/helper.c
parent5c6295a45b4fceac913c11abc62488c49c02b9fd (diff)
parent65a9d3807e9a0ffd9f9719416a07be41b6f39e94 (diff)
downloadfocaccia-qemu-821e7ed167f11f482d2d1a8eaf114a667295a581.tar.gz
focaccia-qemu-821e7ed167f11f482d2d1a8eaf114a667295a581.zip
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/helper.c')
-rw-r--r--target/tilegx/helper.c147
1 files changed, 0 insertions, 147 deletions
diff --git a/target/tilegx/helper.c b/target/tilegx/helper.c
deleted file mode 100644
index c006bf7454..0000000000
--- a/target/tilegx/helper.c
+++ /dev/null
@@ -1,147 +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/exec-all.h"
-#include "exec/helper-proto.h"
-#include <zlib.h> /* For crc32 */
-#include "syscall_defs.h"
-
-void helper_exception(CPUTLGState *env, uint32_t excp)
-{
-    CPUState *cs = env_cpu(env);
-
-    cs->exception_index = excp;
-    cpu_loop_exit(cs);
-}
-
-void helper_ext01_ics(CPUTLGState *env)
-{
-    uint64_t val = env->spregs[TILEGX_SPR_EX_CONTEXT_0_1];
-
-    switch (val) {
-    case 0:
-    case 1:
-        env->spregs[TILEGX_SPR_CRITICAL_SEC] = val;
-        break;
-    default:
-#if defined(CONFIG_USER_ONLY)
-        env->signo = TARGET_SIGILL;
-        env->sigcode = TARGET_ILL_ILLOPC;
-        helper_exception(env, TILEGX_EXCP_SIGNAL);
-#else
-        helper_exception(env, TILEGX_EXCP_OPCODE_UNIMPLEMENTED);
-#endif
-        break;
-    }
-}
-
-uint64_t helper_revbits(uint64_t arg)
-{
-    return revbit64(arg);
-}
-
-/*
- * Functional Description
- *     uint64_t a = rf[SrcA];
- *     uint64_t b = rf[SrcB];
- *     uint64_t d = rf[Dest];
- *     uint64_t output = 0;
- *     unsigned int counter;
- *     for (counter = 0; counter < (WORD_SIZE / BYTE_SIZE); counter++)
- *     {
- *         int sel = getByte (b, counter) & 0xf;
- *         uint8_t byte = (sel < 8) ? getByte (d, sel) : getByte (a, (sel - 8));
- *         output = setByte (output, counter, byte);
- *     }
- *     rf[Dest] = output;
- */
-uint64_t helper_shufflebytes(uint64_t dest, uint64_t srca, uint64_t srcb)
-{
-    uint64_t vdst = 0;
-    int count;
-
-    for (count = 0; count < 64; count += 8) {
-        uint64_t sel = srcb >> count;
-        uint64_t src = (sel & 8) ? srca : dest;
-        vdst |= extract64(src, (sel & 7) * 8, 8) << count;
-    }
-
-    return vdst;
-}
-
-uint64_t helper_crc32_8(uint64_t accum, uint64_t input)
-{
-    uint8_t buf = input;
-
-    /* zlib crc32 converts the accumulator and output to one's complement.  */
-    return crc32(accum ^ 0xffffffff, &buf, 1) ^ 0xffffffff;
-}
-
-uint64_t helper_crc32_32(uint64_t accum, uint64_t input)
-{
-    uint8_t buf[4];
-
-    stl_le_p(buf, input);
-
-    /* zlib crc32 converts the accumulator and output to one's complement.  */
-    return crc32(accum ^ 0xffffffff, buf, 4) ^ 0xffffffff;
-}
-
-uint64_t helper_cmula(uint64_t srcd, uint64_t srca, uint64_t srcb)
-{
-    uint32_t reala = (int16_t)srca;
-    uint32_t imaga = (int16_t)(srca >> 16);
-    uint32_t realb = (int16_t)srcb;
-    uint32_t imagb = (int16_t)(srcb >> 16);
-    uint32_t reald = srcd;
-    uint32_t imagd = srcd >> 32;
-    uint32_t realr = reala * realb - imaga * imagb + reald;
-    uint32_t imagr = reala * imagb + imaga * realb + imagd;
-
-    return deposit64(realr, 32, 32, imagr);
-}
-
-uint64_t helper_cmulaf(uint64_t srcd, uint64_t srca, uint64_t srcb)
-{
-    uint32_t reala = (int16_t)srca;
-    uint32_t imaga = (int16_t)(srca >> 16);
-    uint32_t realb = (int16_t)srcb;
-    uint32_t imagb = (int16_t)(srcb >> 16);
-    uint32_t reald = (int16_t)srcd;
-    uint32_t imagd = (int16_t)(srcd >> 16);
-    int32_t realr = reala * realb - imaga * imagb;
-    int32_t imagr = reala * imagb + imaga * realb;
-
-    return deposit32((realr >> 15) + reald, 16, 16, (imagr >> 15) + imagd);
-}
-
-uint64_t helper_cmul2(uint64_t srca, uint64_t srcb, int shift, int round)
-{
-    uint32_t reala = (int16_t)srca;
-    uint32_t imaga = (int16_t)(srca >> 16);
-    uint32_t realb = (int16_t)srcb;
-    uint32_t imagb = (int16_t)(srcb >> 16);
-    int32_t realr = reala * realb - imaga * imagb + round;
-    int32_t imagr = reala * imagb + imaga * realb + round;
-
-    return deposit32(realr >> shift, 16, 16, imagr >> shift);
-}