Project

General

Profile

Feature #12375

dis support for gfni instructions

Added by Robert Mustacchi 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

In Ice Lake, Intel has added a number of instructions under the GFNI heading which do work on galois fields. This adds support to dis for all of the SSE, VEX, and EVEX encoded variants of these instructions.

#1

Updated by Robert Mustacchi 9 months ago

To test this I wrote new tests for the x86 libdis test suite and verified them:

rm@turin:/ws/rm/dis/usr/src/test/util-tests/tests/dis$ LD_PRELOAD_32=/ws/rm/dis/proto/root_i386/usr/lib/libdisasm.so.1 ksh distest.ksh 
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.sep.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.sep.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.vmx.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.vmx.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.cpuid.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.cpuid.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.mwait.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.mwait.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.fence.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.fence.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.smap.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.smap.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.random.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.random.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.tsc.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.tsc.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.msr.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.msr.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.wbnovind.s (32-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/tst.wbnovind.s (64-bit) ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.bmi2.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.sha.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.avx2-gather.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.gfni.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.fma-pd.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.adx.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.movbe.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.sse-4.2.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.avx512_vpclmulqdq.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.aes.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.vaes.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.fma-sd.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.bmi1.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.fma-ss.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.sse-4.1.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.avx.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.ssse3.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.fma-ps.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.lzcnt.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.opmask.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.popcnt.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.avx512.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.f16c.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.sse-3.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.xsave.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.avx512_vnni.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.avx2.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.pclmulqdq.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/32.clflush.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.bmi2.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.fma-ss.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.avx512_vnni.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.ept.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.gfni.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.vmx.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.fma-ps.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.vaes.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.sse-4.1.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.ssse3.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.avx.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.lzcnt.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.bmi1.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.adx.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.fma-pd.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.sha.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.movbe.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.sse-4.2.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.fma-sd.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.aes.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.avx512_vpclmulqdq.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.fsbase.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.random.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.xsave.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.sse-3.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.pclmulqdq.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.clflush.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.f16c.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.opmask.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.avx2-gather.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.popcnt.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.avx2.s ... passed
testing /ws/rm/dis/usr/src/test/util-tests/tests/dis/i386/64.avx512.s ... passed

--------------
libdis Results
--------------

Tests passed: 82
Tests failed: 0
Tests ran:    82
#2

Updated by Electric Monk 9 months ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit a25e615d76804404e5fc63897a9196d4f92c3f5e

commit  a25e615d76804404e5fc63897a9196d4f92c3f5e
Author: Robert Mustacchi <rm@fingolfin.org>
Date:   2020-03-13T07:57:47.000Z

    12371 dis x86 EVEX prefix mishandled
    12372 dis EVEX encoding SIB mishandled
    12373 dis support for EVEX vaes instructions
    12374 dis support for EVEX vpclmulqdq instructions
    12375 dis support for gfni instructions
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF