koute / polkavm

A fast and secure RISC-V based virtual machine
Apache License 2.0
234 stars 47 forks source link

Consider the Thead extensions #72

Open koute opened 9 months ago

koute commented 9 months ago
    xtheadba                      - 'xtheadba' (T-Head address calculation instructions).
    xtheadbb                      - 'xtheadbb' (T-Head basic bit-manipulation instructions).
    xtheadbs                      - 'xtheadbs' (T-Head single-bit instructions).
    xtheadcmo                     - 'xtheadcmo' (T-Head cache management instructions).
    xtheadcondmov                 - 'xtheadcondmov' (T-Head conditional move instructions).
    xtheadfmemidx                 - 'xtheadfmemidx' (T-Head FP Indexed Memory Operations).
    xtheadmac                     - 'xtheadmac' (T-Head Multiply-Accumulate Instructions).
    xtheadmemidx                  - 'xtheadmemidx' (T-Head Indexed Memory Operations).
    xtheadmempair                 - 'xtheadmempair' (T-Head two-GPR Memory Operations).
    xtheadsync                    - 'xtheadsync' (T-Head multicore synchronization instructions).
    xtheadvdot                    - 'xtheadvdot' (T-Head Vector Extensions for Dot).
koute commented 9 months ago

Number of instruction from a given extension when compiling the Pinky example:

The most promising one is most likely the conditional move extension as it's relatively widely applicable, can reduce the number of basic blocks, and the whole extension is only two extra instructions.