/qemu/target/riscv/ |
H A D | vcrypto_helper.c | 2 * RISC-V Vector Crypto Extension Helpers for QEMU. 21 #include "qemu/host-utils.h" 26 #include "crypto/aes-round.h" 29 #include "exec/helper-proto.h" 36 for (int j = 63; j >= 0; j--) { in clmul64() local 37 if ((y >> j) & 1) { in clmul64() 38 result ^= (x << j); in clmul64() 47 for (int j = 63; j >= 1; j--) { in clmulh64() local 48 if ((y >> j) & 1) { in clmulh64() 49 result ^= (x >> (64 - j)); in clmulh64() [all …]
|
/qemu/target/loongarch/tcg/ |
H A D | vec_helper.c | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 5 * Copyright (c) 2022-2023 Loongson Technology Corporation Limited 10 #include "exec/helper-proto.h" 15 #include "tcg/tcg-gvec-desc.h" 24 typedef __typeof(Vd->E1(0)) TD; \ 28 Vd->E1(i) = DO_OP((TD)Vj->E2(2 * i + 1), (TD)Vk->E2(2 * i)); \ 45 Vd->Q(i) = int128_add(int128_makes64(Vj->D(2 * i + 1)), in HELPER() 46 int128_makes64(Vk->D(2 * i))); in HELPER() 63 Vd->Q(i) = int128_sub(int128_makes64(Vj->D(2 * i + 1)), in HELPER() 64 int128_makes64(Vk->D(2 * i))); in HELPER() [all …]
|
/qemu/tests/unit/ |
H A D | test-int128.c | 5 * See the COPYING.LIB file in the top-level directory. 32 #define MIDDLE (-1ULL & ~LOW & ~HIGH) 49 int i, j; in test_and() local 52 for (j = 0; j < ARRAY_SIZE(tests); ++j) { in test_and() 54 Int128 b = expand(tests[j]); in test_and() 55 Int128 r = expand(tests[i] & tests[j]); in test_and() 65 int i, j; in test_add() local 68 for (j = 0; j < ARRAY_SIZE(tests); ++j) { in test_add() 70 Int128 b = expand(tests[j]); in test_add() 71 Int128 r = expand(tests[i] + tests[j]); in test_add() [all …]
|
H A D | test-crypto-hmac.c | 11 * top-level directory. 102 size_t j; in test_hmac_alloc() local 104 if (!qcrypto_hmac_supports(data->alg)) { in test_hmac_alloc() 108 exp_output = data->hex_digest; in test_hmac_alloc() 110 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_alloc() 119 for (j = 0; j < resultlen; j++) { in test_hmac_alloc() 120 g_assert(exp_output[j * 2] == hex[(result[j] >> 4) & 0xf]); in test_hmac_alloc() 121 g_assert(exp_output[j * 2 + 1] == hex[result[j] & 0xf]); in test_hmac_alloc() 141 size_t j; in test_hmac_prealloc() local 143 if (!qcrypto_hmac_supports(data->alg)) { in test_hmac_prealloc() [all …]
|
H A D | test-crypto-hash.c | 113 size_t j; in test_hash_alloc() local 128 for (j = 0; j < resultlen; j++) { in test_hash_alloc() 129 g_assert(expected_outputs[i][j * 2] == hex[(result[j] >> 4) & 0xf]); in test_hash_alloc() 130 g_assert(expected_outputs[i][j * 2 + 1] == hex[result[j] & 0xf]); in test_hash_alloc() 145 size_t j; in test_hash_prealloc() local 161 /* Validate that our pre-allocated pointer was not replaced */ in test_hash_prealloc() 164 for (j = 0; j < resultlen; j++) { in test_hash_prealloc() 165 g_assert(expected_outputs[i][j * 2] == hex[(result[j] >> 4) & 0xf]); in test_hash_prealloc() 166 g_assert(expected_outputs[i][j * 2 + 1] == hex[result[j] & 0xf]); in test_hash_prealloc() 187 size_t j; in test_hash_iov() local [all …]
|
/qemu/tcg/loongarch64/ |
H A D | tcg-insn-defs.c.inc | 1 /* SPDX-License-Identifier: MIT */ 5 * This file is auto-generated by genqemutcgdefs from 6 * https://github.com/loongson-community/loongarch-opcodes, 555 encode_dj_slots(LoongArchInsn opc, uint32_t d, uint32_t j) 557 return opc | d | j << 5; 561 encode_djk_slots(LoongArchInsn opc, uint32_t d, uint32_t j, uint32_t k) 563 return opc | d | j << 5 | k << 10; 567 encode_djka_slots(LoongArchInsn opc, uint32_t d, uint32_t j, uint32_t k, 570 return opc | d | j << 5 | k << 10 | a << 15; 574 encode_djkm_slots(LoongArchInsn opc, uint32_t d, uint32_t j, uint32_t k, [all …]
|
/qemu/tests/tcg/multiarch/ |
H A D | float_madds.c | 6 * SPDX-License-Identifier: GPL-2.0-or-later 53 static void print_result(float r, int j, int k) in print_result() argument 60 printf("res: %s flags=%s (%d/%d)\n", r_fmt, flag_fmt, j, k); in print_result() 66 static void do_madds(float a, float b, float c, int j, int k) in do_madds() argument 75 print_result(r, j, k); in do_madds() 80 int i, j, k, nums = get_num_f32(); in main() local 89 for (j = 0; j < nums; j++) { in main() 91 a = get_f32(j + ((k)%3)); in main() 92 b = get_f32(j + ((k+1)%3)); in main() 93 c = get_f32(j + ((k+2)%3)); in main() [all …]
|
/qemu/tests/tcg/s390x/ |
H A D | long-double.c | 3 * With small integral numbers, we can cross-check with integers. 10 int i, j; in main() local 13 for (j = 1; j < 5; j++) { in main() 14 long double la = (long double)i + j; in main() 15 long double lm = (long double)i * j; in main() 16 long double ls = (long double)i - j; in main() 18 assert(la == i + j); in main() 19 assert(lm == i * j); in main() 20 assert(ls == i - j); in main()
|
/qemu/ui/ |
H A D | vnc-enc-hextile-template.h | 18 VncDisplay *vd = vs->vd; in CONCAT() 21 int j, i; in CONCAT() local 35 assert(vs->client_pf.bytes_per_pixel <= MAX_BYTES_PER_PIXEL); in CONCAT() 37 for (j = 0; j < h; j++) { in CONCAT() 96 for (j = 0; j < h; j++) { in CONCAT() 97 int min_x = -1; in CONCAT() 100 if (min_x == -1) in CONCAT() 102 } else if (min_x != -1) { in CONCAT() 103 hextile_enc_cord(data + n_data, min_x, j, i - min_x, 1); in CONCAT() 106 min_x = -1; in CONCAT() [all …]
|
/qemu/tests/tcg/hexagon/ |
H A D | hvx_misc.h | 2 * Copyright(c) 2021-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. 21 static inline void check(int line, int i, int j, in check() argument 26 line, i, j, result, expect); in check() 58 for (int j = 0; j < MAX_VEC_SIZE_BYTES / FIELDSZ; j++) { \ 59 check(line, i, j, output[i].FIELD[j], expect[i].FIELD[j]); \ 74 for (int j = 0; j < MAX_VEC_SIZE_BYTES; j++) { in init_buffers() local 75 buffer0[i].b[j] = counter0++; in init_buffers() 76 buffer1[i].b[j] = counter1++; in init_buffers() 78 for (int j = 0; j < MAX_VEC_SIZE_BYTES / 4; j++) { in init_buffers() local 79 mask[i].w[j] = (i + j % MASKMOD == 0) ? 0 : 1; in init_buffers() [all …]
|
H A D | hvx_misc.c | 2 * Copyright(c) 2021-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. 55 for (int j = 0; j < MAX_VEC_SIZE_BYTES / 4; j++) { in test_load_tmp() local 56 expect[i].w[j] = buffer0[i].w[j] + buffer1[i].w[j] + 1; in test_load_tmp() 107 for (int j = 0; j < MAX_VEC_SIZE_BYTES / 4; j++) { in test_load_cur() local 108 expect[i].uw[j] = buffer0[i].uw[j]; in test_load_cur() 207 "if (q0) vmem(%2) = v5\n\t" /* Non-inverted test */ in test_masked_store() 215 for (int j = 0; j < MAX_VEC_SIZE_BYTES / 4; j++) { in test_masked_store() local 217 if (i + j % MASKMOD != 0) { in test_masked_store() 218 expect[i].w[j] = buffer0[i].w[j]; in test_masked_store() 221 if (i + j % MASKMOD == 0) { in test_masked_store() [all …]
|
H A D | v69_hvx.c | 29 ((VAL) + (((SHAMT) > 0) ? (1LL << ((SHAMT) - 1)) : 0)) 62 for (int j = 0; j < MAX_VEC_SIZE_BYTES / 2; j++) { in test_vasrvuhubrndsat() local 67 shamt = buffer1[i].ub[2 * j + 0] & 0x7; in test_vasrvuhubrndsat() 68 byte0 = fVSATUB(fVROUND(buffer0[2 * i + 0].uh[j], shamt) >> shamt); in test_vasrvuhubrndsat() 69 shamt = buffer1[i].ub[2 * j + 1] & 0x7; in test_vasrvuhubrndsat() 70 byte1 = fVSATUB(fVROUND(buffer0[2 * i + 1].uh[j], shamt) >> shamt); in test_vasrvuhubrndsat() 71 expect[i].uh[j] = (byte1 << 8) | (byte0 & 0xff); in test_vasrvuhubrndsat() 99 for (int j = 0; j < MAX_VEC_SIZE_BYTES / 2; j++) { in test_vasrvuhubsat() local 104 shamt = buffer1[i].ub[2 * j + 0] & 0x7; in test_vasrvuhubsat() 105 byte0 = fVSATUB(buffer0[2 * i + 0].uh[j] >> shamt); in test_vasrvuhubsat() [all …]
|
/qemu/hw/intc/ |
H A D | slavio_intctl.c | 4 * Copyright (c) 2003-2005 Fabrice Bellard 41 * http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR89C105.txt 88 // per-cpu interrupt controller 98 ret = s->intreg_pending; in slavio_intctl_mem_readl() 104 trace_slavio_intctl_mem_readl(s->cpu, addr, ret); in slavio_intctl_mem_readl() 116 trace_slavio_intctl_mem_writel(s->cpu, addr, val); in slavio_intctl_mem_writel() 120 s->intreg_pending &= ~val; in slavio_intctl_mem_writel() 121 slavio_check_interrupts(s->master, 1); in slavio_intctl_mem_writel() 122 trace_slavio_intctl_mem_writel_clear(s->cpu, val, s->intreg_pending); in slavio_intctl_mem_writel() 126 s->intreg_pending |= val; in slavio_intctl_mem_writel() [all …]
|
/qemu/.gitlab-ci.d/custom-runners/ |
H A D | ubuntu-22.04-aarch64.yml | 1 # All ubuntu-22.04 jobs should run successfully in an environment 2 # setup by the scripts/ci/setup/ubuntu/build-environment.yml task 5 ubuntu-22.04-aarch64-all-linux-static: 10 - ubuntu_22.04 11 - aarch64 13 - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' 14 - if: "$AARCH64_RUNNER_AVAILABLE" 16 - mkdir build 17 - cd build 18 # Disable -static-pie due to build error with system libc: [all …]
|
H A D | ubuntu-22.04-s390x.yml | 1 # All ubuntu-22.04 jobs should run successfully in an environment 2 # setup by the scripts/ci/setup/ubuntu/build-environment.yml task 5 ubuntu-22.04-s390x-all-linux: 10 - ubuntu_22.04 11 - s390x 13 - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' 14 - if: "$S390X_RUNNER_AVAILABLE" 16 - mkdir build 17 - cd build 18 - ../configure --enable-debug --disable-system --disable-tools --disable-docs [all …]
|
/qemu/linux-user/aarch64/ |
H A D | signal.c | 21 #include "user-internals.h" 22 #include "signal-common.h" 23 #include "linux-user/trace.h" 24 #include "target/arm/cpu-features.h" 42 /* glibc uses a 1024-bit sigset_t */ 43 char __unused[1024 / 8 - sizeof(target_sigset_t)]; 51 * and be 16-byte aligned. The last structure must be a dummy one with the 72 uint64_t datap; /* 16-byte aligned pointer to extra space cast to __u64 */ 139 __put_user(0, &sf->uc.tuc_flags); in target_setup_general_frame() 140 __put_user(0, &sf->uc.tuc_link); in target_setup_general_frame() [all …]
|
/qemu/tests/tcg/mips/user/ase/msa/fixed-multiply/ |
H A D | test_msa_msubr_q_w.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MADDR_Q_W(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MADDR_Q_W(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_msub_q_h.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MSUB_Q_H(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MSUB_Q_H(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_msubr_q_h.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MSUBR_Q_H(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MSUBR_Q_H(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_maddr_q_h.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MADDR_Q_H(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MADDR_Q_H(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_madd_q_w.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MADD_Q_W(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MADD_Q_W(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_msub_q_w.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MSUB_Q_W(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MSUB_Q_W(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_madd_q_h.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MADD_Q_H(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MADD_Q_H(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
H A D | test_msa_maddr_q_w.c | 6 * Copyright (C) 2019 RT-RK Computer Based Systems LLC 7 * Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com> 42 uint32_t i, j; in main() local 167 for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) { in main() 168 do_msa_MADDR_Q_W(b128_pattern[i], b128_pattern[j], in main() 169 b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]); in main() 174 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() 175 do_msa_MADDR_Q_W(b128_random[i], b128_random[j], in main() 178 RANDOM_INPUTS_SHORT_COUNT * i + j]); in main() 183 for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) { in main() [all …]
|
/qemu/linux-user/arm/ |
H A D | target_proc.h | 2 * Arm specific proc functions for linux-user 4 * SPDX-License-Identifier: GPL-2.0-or-later 26 midr_rev = FIELD_EX32(cpu->midr, MIDR_EL1, REVISION); in open_cpuinfo() 27 midr_part = FIELD_EX32(cpu->midr, MIDR_EL1, PARTNUM); in open_cpuinfo() 28 midr_var = FIELD_EX32(cpu->midr, MIDR_EL1, VARIANT); in open_cpuinfo() 29 midr_impl = FIELD_EX32(cpu->midr, MIDR_EL1, IMPLEMENTER); in open_cpuinfo() 35 if (!arm_feature(&cpu->env, ARM_FEATURE_V8)) { in open_cpuinfo() 36 if (arm_feature(&cpu->env, ARM_FEATURE_V7)) { in open_cpuinfo() 38 midr_var = (cpu->midr >> 16) & 0x7f; in open_cpuinfo() 40 if (arm_feature(&cpu->env, ARM_FEATURE_M)) { in open_cpuinfo() [all …]
|