aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns
AgeCommit message (Collapse)AuthorFilesLines
2022-10-11Set tval on illegal subforms of aes64ks1iAndrew Waterman1-4/+1
h/t @YenHaoChen
2022-10-04Fix unused-variable warnings in P-extension instruction definitionsAndrew Waterman1-1/+0
2022-10-04Suppress unused-variable warnings in vector instruction definitionsAndrew Waterman6-10/+0
2022-10-04Suppress unused-variable warnings in AES codeAndrew Waterman1-2/+2
2022-10-04Suppress most unused variable warningsAndrew Waterman2-2/+2
2022-09-28Fix vmv.x.s for RV32Andrew Waterman1-8/+9
The Spike internals require that, when XLEN is narrower than reg_t, values be sign-extended to the width of reg_t.
2022-09-08Remove unnecessary argument alu(always false) from macroWeiwei Li3-3/+3
require_vector_novtype
2022-09-06fix comment in definition of vmv<nf>r.vAndrew Waterman1-1/+1
2022-09-06vmv<nf>r.v depends on vtype, and therefore should check villAndrew Waterman1-1/+1
2022-08-22Fix redundant loops when calculating vrgather.vi. (#1072)yangcheng1-6/+0
2022-08-12Remove unused code in vsmul* (#1069)ksco2-19/+2
2022-08-10Add space between if/while/switch and '('Weiwei Li47-56/+56
Add space between ')' and '{'
2022-08-04Modify F/D/Zfh instructions to add support for Zfinx/Zdinx/Zhinx{min} ↵liweiwei87-193/+193
instructions change the extention check for F/D/Zfh instructions modify the F/D/Zfh instructions to read X regs when enable Zfinx Co-authored-by: wangmeng <shusheng8495@hotmail.com>
2022-08-01WFI condition fixCanberk Topal1-1/+3
Before this commit Spike was requiring S mode privilege even without S mode implemented. This commit fixes it. Signed-off-by: Canberk Topal <ctopal@lowrisc.org>
2022-07-28Fix overflow issue of p-ext multiply instructions (#1053)ChunPing Chung8-8/+8
2022-05-19Move ebreak* logic from take_trap into instructions. (#1006)Tim Newsome2-2/+16
Now that logic only affects ebreak instructions, and does not affect triggers that also cause a trap to be taken. Fixes #725. Although like Paul, I don't have a test for this case. Introduce trap_debug_mode so so ebreak instructions can force entry into debug mode.
2022-04-10Adjust the access index of vs2 to zero in vmv_x_s.h (#969)Brandon Wu1-21/+17
2022-04-07Rename processor_t::set_csr to put_csr to fix build on RISC-VAndrew Waterman7-7/+7
The alternative would be to #undef set_csr after including encoding.h, but this solution strikes me as cleaner. Part of the reason is that set_csr was not a great name: it sounds like it implements the CSRRS (read & set) instruction, rather than impelementing a simple write.
2022-03-29Fix start byte for vmv<nf>r.v (#959)liweiwei901-3/+4
'The instructions operate as if EEW=SEW.EMUL = NREG, effective length evl= EMUL * VLEN/SEW.' So the start byte should take sew into acount when vstart != 0
2022-03-12Construct an isa_parser_t and pass it to processor_t constructorRupert Swarbrick1-2/+2
This is a minor change, turning processor_t from a child class of isa_parser_t into a class that contains an isa_parser_t as a field. The point is that it is a step toward separating out "configuration" (and ISA string parsing) from processor state. This should be helpful for rejigging things so that we construct more from a supplied device tree.
2022-02-27perform hstatus probe/update for sret only when H extension enabled. (#934)Neel Gala1-5/+6
* perform hstatus probe/update for sret only when H extension enabled. * added missing parenthesis
2022-02-23csr: hyper: fix mstatus.mpp after mretChih-Min Chao1-1/+1
By spec 3.1.6.1 (original behavior) "x PP is set to the least-privileged supported mode (U if U-mode is implemented, else M)" By spec 8.6.4 (h-extension) "MRET first determines what the new privilege mode will be according to the values of MPP and MPV in mstatus or mstatush, as encoded in Table 8.8. MRET then in mstatus/mstatush sets MPV=0, MPP=0, MIE=MPIE, and MPIE=1" Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
2022-02-17Split Xbitmanip into its proposed component extensions (#918)Rupert Swarbrick59-59/+69
Before this patch, spike just had an "Xbitmanip" extension which covered everything in the proposed bitmanip extension that hadn't been ratified. The problem is that if you want to model (or verify) a processor that targetted just some of the proposed bitmanip extension, you couldn't configure Spike to do that. For example, the lowRISC Ibex processor has several different configurations. The "balanced" configuration targetted Zba, Zbb, Zbs, Zbf and Zbt of the 0.92 spec. With the Zba, Zbb and Zbs ratified, we'll now be able to use an ISA string like rv32imc_Zba_Zbb_Zbs_XZbf_XZbt and Spike will correctly fail to decode instructions like 'bcompress', which would have been decoded with Xbitmanip. This patch adds a new custom extension name for each part of the extension that wasn't fully ratified. These have an 'X' prefix so, for example, the bit permutation instructions that were proposed as Zbp can be found under XZbp. Specifying "Xbitmanip" gets all of these extensions, so its behaviour should be unchanged. Note that the slo(i) / sro(i) instructions have been moved from the proposed Zbb to XZbp. This matches a comment in the Change History section of v0.93 of the bitmanip spec: it seems that the authors forgot to also move them in Table 2.1 (which gives the lists of instructions for each extension). This change won't break anything that currently exists, but it took quite a while to figure out what was going on so I thought I'd leave a breadcrumb trail for the next engineer! The bulk of the patch is just defining some more entries in the isa_extension_t enum and rewriting each of the instructions to depend on the relevant entry. This is mostly a straight textual replacement but it's slightly more complicated for things like the "pack" instruction that are defined by several different proposed extensions.
2022-01-30add instructions function for cmoliweiwei5-0/+22
prefetch.* are hints and share the encoding of ORI with rd = 0. so it can share the implementation of ORI and execute as no-ops
2021-12-27Update instruction vmandnot.mm, vmornot.mm -> vmandn.mm, vmorn.mm (#896)Yueh-Ting (eop) Chen4-4/+4
Refer to rvv-spec v1.0-rc2
2021-12-17Merge pull request #881 from eopXD/simplify-float-convertAndrew Waterman22-407/+177
Simplify float convert instructions
2021-12-09P-ext v.0.9.11. update (#883)marcfedorow4-4/+4
2021-12-09Simplfy vfmv_v_f (#884)Yueh-Ting (eop) Chen1-30/+3
2021-12-09Simplify vfwcvteopXD7-156/+62
2021-12-09Simplfy vfcvteopXD6-66/+36
2021-12-09Simplify vfncvteopXD8-182/+76
2021-12-08Have vd.v unexposedeopXD1-3/+3
2021-12-07Add 'Zfhmin' extension (#880)Tsukasa #01 (a4lg)10-10/+10
Zfhmin is a subset of Zfh (half-precision IEEE 754 binary16 floating point) extension, consisting only of data transfer and conversion instructions. This commit adds `EXT_ZFHMIN` to `isa_extension_t`, permits "zfhmin" as a multi-letter extension and adjusts feature gate for data transfer / conversion instructions. * FLH / FSH * FMV.X.H / FMV.H.X * FCVT.S.H / FCVT.H.S * FCVT.D.H / FCVT.H.D (if 'D' extension is also present) * FCVT.Q.H / FCVT.H.Q (if 'Q' extension is also present)
2021-12-07Merge pull request #879 from eopXD/simply-instsAndrew Waterman17-109/+29
Simply floating point parameters and merge operations
2021-12-07Simplify vadc and vsbc (#876)Yueh-Ting (eop) Chen5-30/+5
2021-12-07Merge pull request #868 from eopXD/simplify-narrowing-instAndrew Waterman12-18/+18
Simplify narrowing instruction
2021-12-07Simplify vwmulsu_vv and vwmulsu_vx (#861)Yueh-Ting (eop) Chen2-22/+2
Leverage macro VI_WIDE_OP_AND_ASSIGN_MIX
2021-12-08Simplify vmerge, vfmergeeopXD7-73/+9
2021-12-08Simplify floating point compare instructionseopXD10-30/+20
2021-12-08Simply parameters for floating-point instructionseopXD1-9/+3
2021-12-06Simplify vmadc and vmsbc (#877)Yueh-Ting (eop) Chen5-45/+5
2021-11-30Simplify mulhsu (#870)Yueh-Ting (eop) Chen2-72/+4
2021-11-29Revert "Simplify vmulhsu (#863)"Andrew Waterman2-6/+72
This reverts commit 1a5b2d9dda8741e98444289135e0fbcb2c3f5740, which is buggy (the vs1 argument is being sign-extended).
2021-11-28Have nclip_{wv/wx/wi} use different macroseopXD6-12/+12
This allows them to share PARAM macro with narrowing right-shift instructions. Rename VV_NSHIFT_PARAMS -> VV_NARROW_PARAMS so nclip, nsra, nsrl can share it. (Same goes to VX_NSHIFT_PARAMS and VI_NSHIFT_PARAMS)
2021-11-28Eliminate redundant parameters for narrowing integer right shift instructionseopXD6-6/+6
2021-11-27Simplify single-width averaging add and subtract (#867)Yueh-Ting (Eop) Chen8-8/+8
2021-11-26Simplify vmulhsu (#863)Yueh-Ting (Eop) Chen2-72/+6
2021-11-04Report proper GVA bit on breakpoint trapsScott Johnson2-2/+2
2021-11-04Add gva field to trap_breakpointScott Johnson2-2/+2
So I can fix breakpoints next to properly report gva.
2021-11-02Zbkx renames xperm.n and xperm.b as xperm4 and xperm8. (#846)Markku-Juhani O. Saarinen4-0/+0
Krypto 1.0 changes: Entropy source CSR, name. List scalar crypto instruction groupings, as there is no single K extension. Co-authored-by: Markku-Juhani O. Saarinen <mjos@mjos.fi>