Lines Matching +full:- +full:chs
24 #include "exec/helper-proto.h"
25 #include "qemu/host-utils.h"
27 #include "qemu/main-loop.h"
31 #include "exec/cpu-common.h"
32 #include "accel/tcg/cpu-ldst.h"
33 #include "accel/tcg/helper-retaddr.h"
36 #include "exec/tlb-flags.h"
42 #include "user/page-protection.h"
61 if (num == LLONG_MIN && den == -1) { in HELPER()
86 env->pstate |= PSTATE_ALLINT; in HELPER()
105 env->daif |= (imm << 6) & PSTATE_DAIF; in HELPER()
112 env->daif &= ~((imm << 6) & PSTATE_DAIF); in HELPER()
202 return -float64_eq_quiet(a, b, fpst); in HELPER()
207 return -float64_le(b, a, fpst); in HELPER()
212 return -float64_lt(b, a, fpst); in HELPER()
217 * versions, these do a fully fused multiply-add or
218 * multiply-add-and-halve.
234 DO_RECPS(recpsf_f16, uint32_t, float16, chs) in DO_RECPS() argument
235 DO_RECPS(recpsf_f32, float32, float32, chs) in DO_RECPS()
236 DO_RECPS(recpsf_f64, float64, float64, chs) in DO_RECPS()
252 -1, 0, fpst); \ in DO_RECPS()
255 DO_RSQRTSF(rsqrtsf_f16, uint32_t, float16, chs)
256 DO_RSQRTSF(rsqrtsf_f32, float32, float32, chs)
257 DO_RSQRTSF(rsqrtsf_f64, float64, float64, chs)
262 /* Floating-point reciprocal exponent - see FPRecpX in ARM ARM */
272 if (!fpst->default_nan_mode) {
276 if (fpst->default_nan_mode) {
304 if (!fpst->default_nan_mode) { in HELPER()
308 if (fpst->default_nan_mode) { in HELPER()
336 if (!fpst->default_nan_mode) { in HELPER()
340 if (fpst->default_nan_mode) { in HELPER()
406 /* 64-bit versions of the CRC helpers. Note that although the operation in AH_MINMAX_HELPER()
409 * uint64_t for convenience of the generated code. Unlike the 32-bit in AH_MINMAX_HELPER()
435 * AdvSIMD half-precision
470 /* Data processing - scalar floating-point and advanced SIMD */ in ADVSIMD_TWOHALFOP()
488 /* fused multiply-accumulate */ in ADVSIMD_TWOHALFOP()
513 * routines return float_relation types which we convert to the 0/-1
580 * or -1 if it is invalid (an illegal return) in el_from_spsr()
600 return -1; in el_from_spsr()
605 return -1; in el_from_spsr()
609 return -1; in el_from_spsr()
621 env->pstate = (env->pstate & ~PSTATE_SS) | (val & PSTATE_SS); in cpsr_write_from_spsr_elx()
630 mask = aarch32_cpsr_valid_mask(env->features, \ in cpsr_write_from_spsr_elx()
631 &env_archcpu(env)->isar); in cpsr_write_from_spsr_elx()
640 uint32_t spsr = env->banked_spsr[spsr_idx]; in HELPER()
664 if (cur_el == 3 && (env->cp15.scr_el3 & (SCR_NS | SCR_NSE)) == SCR_NSE) { in HELPER()
669 if (new_el == -1) { in HELPER()
685 /* Return to AArch32 when CPU is AArch64-only */ in HELPER()
698 env->aarch64 = false; in HELPER()
701 * caught all the bad-mode cases in el_from_spsr(). in HELPER()
705 env->pstate &= ~PSTATE_SS; in HELPER()
710 env->regs[15] = new_pc & ~0x1; in HELPER()
712 env->regs[15] = new_pc & ~0x3; in HELPER()
717 cur_el, new_el, env->regs[15]); in HELPER()
721 env->aarch64 = true; in HELPER()
722 spsr &= aarch64_pstate_valid_mask(&cpu->isar); in HELPER()
725 env->pstate &= ~PSTATE_SS; in HELPER()
737 tbii = EX_TBFLAG_A64(env->hflags, TBII); in HELPER()
747 env->pc = new_pc; in HELPER()
751 cur_el, new_el, env->pc); in HELPER()
774 env->pstate |= PSTATE_IL; in HELPER()
775 env->pc = new_pc; in HELPER()
780 env->pstate &= ~PSTATE_SS; in HELPER()
784 "resuming execution at 0x%" PRIx64 "\n", cur_el, env->pc); in HELPER()
792 * Implement DC ZVA, which zeroes a fixed-length block of memory. in HELPER()
798 int blocklen = 4 << env_archcpu(env)->dcz_blocksize; in HELPER()
799 uint64_t vaddr = vaddr_in & ~(blocklen - 1); in HELPER()
862 return env->cp15.sctlr_el[1] & SCTLR_MSCEN; in mops_enabled()
864 return env->cp15.sctlr_el[2] & SCTLR_MSCEN; in mops_enabled()
907 if (env->CF != 0) { in check_mops_wrong_option()
908 syndrome |= 1 << 17; /* Set the wrong-option bit */ in check_mops_wrong_option()
920 return TARGET_PAGE_ALIGN(addr + 1) - addr; in page_limit()
973 * Slow-path: just do one byte write. This will handle the in set_step()
991 * in 16-byte chunks. SETP accesses are not tag checked; they set
1013 * Slow-path: just do one write. This will handle the in set_step_tags()
1088 * Runtime equivalent of cpu_reg() -- return the CPU register value, in arm_reg_or_xzr()
1091 return reg == 31 ? 0 : env->xregs[reg]; in arm_reg_or_xzr()
1097 * address in the SETP insn, and set Xn to be -(bytes remaining).
1105 * @is_setg: true if this is the tag-setting SETG variant
1116 uint64_t toaddr = env->xregs[rd]; in do_setp()
1117 uint64_t setsize = env->xregs[rn]; in do_setp()
1137 env->xregs[rd] = toaddr; in do_setp()
1138 env->xregs[rn] = setsize; in do_setp()
1141 setsize -= step; in do_setp()
1142 stagesetsize -= step; in do_setp()
1145 env->xregs[rd] = toaddr + setsize; in do_setp()
1146 env->xregs[rn] = -setsize; in do_setp()
1149 env->NF = 0; in do_setp()
1150 env->ZF = 1; /* our env->ZF encoding is inverted */ in do_setp()
1151 env->CF = 0; in do_setp()
1152 env->VF = 0; in do_setp()
1168 /* Main: we choose to do all the full-page chunks */ in do_setm()
1174 uint64_t toaddr = env->xregs[rd] + env->xregs[rn]; in do_setm()
1175 uint64_t setsize = -env->xregs[rn]; in do_setm()
1185 if (env->xregs[rn] == 0) { in do_setm()
1210 setsize -= step; in do_setm()
1211 stagesetsize -= step; in do_setm()
1212 env->xregs[rn] = -setsize; in do_setm()
1237 uint64_t toaddr = env->xregs[rd] + env->xregs[rn]; in do_sete()
1238 uint64_t setsize = -env->xregs[rn]; in do_sete()
1274 setsize -= step; in do_sete()
1275 env->xregs[rn] = -setsize; in do_sete()
1441 memmove(wmem - (copysize - 1), rmem - (copysize - 1), copysize); in copy_step_rev()
1467 uint64_t toaddr = env->xregs[rd]; in do_cpyp()
1468 uint64_t fromaddr = env->xregs[rs]; in do_cpyp()
1469 uint64_t copysize = env->xregs[rn]; in do_cpyp()
1477 * Copy backwards if necessary. The direction for a non-overlapping in do_cpyp()
1507 env->xregs[rd] = toaddr; in do_cpyp()
1508 env->xregs[rs] = fromaddr; in do_cpyp()
1509 env->xregs[rn] = copysize; in do_cpyp()
1514 copysize -= step; in do_cpyp()
1515 stagecopysize -= step; in do_cpyp()
1518 env->xregs[rd] = toaddr + copysize; in do_cpyp()
1519 env->xregs[rs] = fromaddr + copysize; in do_cpyp()
1520 env->xregs[rn] = -copysize; in do_cpyp()
1527 toaddr += copysize - 1; in do_cpyp()
1528 fromaddr += copysize - 1; in do_cpyp()
1532 env->xregs[rn] = copysize; in do_cpyp()
1535 copysize -= step; in do_cpyp()
1536 stagecopysize -= step; in do_cpyp()
1537 toaddr -= step; in do_cpyp()
1538 fromaddr -= step; in do_cpyp()
1544 env->xregs[rn] = copysize; in do_cpyp()
1548 env->NF = 0; in do_cpyp()
1549 env->ZF = 1; /* our env->ZF encoding is inverted */ in do_cpyp()
1550 env->CF = 0; in do_cpyp()
1551 env->VF = 0; in do_cpyp()
1582 if (env->xregs[rn] == 0) { in do_cpym()
1589 forwards = (int64_t)env->xregs[rn] < 0; in do_cpym()
1593 toaddr = env->xregs[rd] + env->xregs[rn]; in do_cpym()
1594 fromaddr = env->xregs[rs] + env->xregs[rn]; in do_cpym()
1595 copysize = -env->xregs[rn]; in do_cpym()
1597 copysize = env->xregs[rn]; in do_cpym()
1599 toaddr = env->xregs[rd] + copysize - 1; in do_cpym()
1600 fromaddr = env->xregs[rs] + copysize - 1; in do_cpym()
1619 copysize -= step; in do_cpym()
1620 env->xregs[rn] = -copysize; in do_cpym()
1630 toaddr -= step; in do_cpym()
1631 fromaddr -= step; in do_cpym()
1632 copysize -= step; in do_cpym()
1633 env->xregs[rn] = copysize; in do_cpym()
1669 if (env->xregs[rn] == 0) { in do_cpye()
1676 forwards = (int64_t)env->xregs[rn] < 0; in do_cpye()
1680 toaddr = env->xregs[rd] + env->xregs[rn]; in do_cpye()
1681 fromaddr = env->xregs[rs] + env->xregs[rn]; in do_cpye()
1682 copysize = -env->xregs[rn]; in do_cpye()
1684 copysize = env->xregs[rn]; in do_cpye()
1686 toaddr = env->xregs[rd] + copysize - 1; in do_cpye()
1687 fromaddr = env->xregs[rs] + copysize - 1; in do_cpye()
1697 /* Check the size; we don't want to have do a check-for-interrupts */ in do_cpye()
1710 copysize -= step; in do_cpye()
1711 env->xregs[rn] = -copysize; in do_cpye()
1717 toaddr -= step; in do_cpye()
1718 fromaddr -= step; in do_cpye()
1719 copysize -= step; in do_cpye()
1720 env->xregs[rn] = copysize; in do_cpye()
1749 return full->extra.arm.guarded; in is_guarded_page()
1758 * the beginning of a block, so PC is always up-to-date and in HELPER()
1761 if (is_guarded_page(env, env->pc, 0)) { in HELPER()
1762 raise_exception(env, EXCP_UDEF, syn_btitrap(env->btype), in HELPER()
1773 env->btype = is_guarded_page(env, pc, GETPC()) ? 3 : 1; in HELPER()