Text file src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/go_amd64.yaml

     1  !sum
     2  # Average (unsigned byte, unsigned word)
     3  # Instructions: VPAVGB, VPAVGW
     4  - go: Average
     5    asm: "VPAVG[BW]" # Matches VPAVGB (byte) and VPAVGW (word)
     6    in:
     7    - &uint_t # $t will be Uint8xN for VPAVGB, Uint16xN for VPAVGW
     8      go: $t
     9      base: uint
    10    - *uint_t
    11    out:
    12    - *uint_t
    13  
    14  # Absolute Value (signed byte, word, dword, qword)
    15  # Instructions: VPABSB, VPABSW, VPABSD, VPABSQ
    16  - go: Abs
    17    asm: "VPABS[BWDQ]" # Matches VPABSB, VPABSW, VPABSD, VPABSQ
    18    in:
    19    - &int_t # $t will be Int8xN, Int16xN, Int32xN, Int64xN
    20      go: $t
    21      base: int
    22    out:
    23    - *int_t # Output is magnitude, fits in the same signed type
    24  
    25  # Sign Operation (signed byte, word, dword)
    26  # Instructions: VPSIGNB, VPSIGNW, VPSIGND
    27  - go: MulSign
    28    asm: "VPSIGN[BWD]" # Matches VPSIGNB, VPSIGNW, VPSIGND
    29    in:
    30    - *int_t # value to multiply by sign
    31    - *int_t # value from which to take the sign
    32    out:
    33    - *int_t
    34  
    35  # Population Count (count set bits in each element)
    36  # Instructions: VPOPCNTB, VPOPCNTW (AVX512_BITALG)
    37  #               VPOPCNTD, VPOPCNTQ (AVX512_VPOPCNTDQ)
    38  - go: OnesCount
    39    asm: "VPOPCNT[BWDQ]"
    40    in:
    41    - &any
    42      go: $t
    43    out:
    44    - *any
    45  

View as plain text