diff options
author | Robert Mustacchi <rm@joyent.com> | 2016-11-11 01:12:17 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2017-01-09 08:11:29 -0800 |
commit | 81293f932bdae6cf8a937185914925a57ec4ad7b (patch) | |
tree | 2474fd0d4038bddc71358cbd520837845dc6bf91 | |
parent | b7b26e12d252c977b500719111379b6b9aeeb4e5 (diff) | |
download | illumos-joyent-81293f932bdae6cf8a937185914925a57ec4ad7b.tar.gz |
7733 Need SHA Instruction dis support
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>
-rw-r--r-- | usr/src/common/dis/i386/dis_tables.c | 11 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-test-utiltest.mf | 4 | ||||
-rw-r--r-- | usr/src/test/util-tests/tests/dis/Makefile | 2 | ||||
-rw-r--r-- | usr/src/test/util-tests/tests/dis/i386/32.sha.out | 28 | ||||
-rw-r--r-- | usr/src/test/util-tests/tests/dis/i386/32.sha.s | 53 | ||||
-rw-r--r-- | usr/src/test/util-tests/tests/dis/i386/64.sha.out | 28 | ||||
-rw-r--r-- | usr/src/test/util-tests/tests/dis/i386/64.sha.s | 53 |
7 files changed, 175 insertions, 4 deletions
diff --git a/usr/src/common/dis/i386/dis_tables.c b/usr/src/common/dis/i386/dis_tables.c index c21c392d77..4360009b26 100644 --- a/usr/src/common/dis/i386/dis_tables.c +++ b/usr/src/common/dis/i386/dis_tables.c @@ -21,7 +21,7 @@ */ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2015, Joyent, Inc. + * Copyright 2016 Joyent, Inc. */ /* @@ -1478,8 +1478,8 @@ const instable_t dis_op0F38[256] = { /* [C0] */ INVALID, INVALID, INVALID, INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, -/* [C8] */ INVALID, INVALID, INVALID, INVALID, -/* [CC] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ TNSZ("sha1nexte",XMM,16),TNSZ("sha1msg1",XMM,16),TNSZ("sha1msg2",XMM,16),TNSZ("sha256rnds2",XMM,16), +/* [CC] */ TNSZ("sha256msg1",XMM,16),TNSZ("sha256msg2",XMM,16),INVALID, INVALID, /* [D0] */ INVALID, INVALID, INVALID, INVALID, /* [D4] */ INVALID, INVALID, INVALID, INVALID, @@ -1641,7 +1641,7 @@ const instable_t dis_op0F3A[256] = { /* [C0] */ INVALID, INVALID, INVALID, INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, /* [C8] */ INVALID, INVALID, INVALID, INVALID, -/* [CC] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ TNSZ("sha1rnds4",XMMP,16),INVALID, INVALID, INVALID, /* [D0] */ INVALID, INVALID, INVALID, INVALID, /* [D4] */ INVALID, INVALID, INVALID, INVALID, @@ -3286,6 +3286,8 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mode) goto error; #endif switch (dp->it_adrmode) { + case XMMP: + break; case XMMP_66r: case XMMPRM_66r: case XMM3PM_66r: @@ -3369,6 +3371,7 @@ dtrace_disx86(dis86_t *x, uint_t cpu_mode) #endif switch (dp->it_adrmode) { case ADX: + case XMM: break; case RM_66r: case XMM_66r: diff --git a/usr/src/pkg/manifests/system-test-utiltest.mf b/usr/src/pkg/manifests/system-test-utiltest.mf index 46e691f849..bd977ecd6f 100644 --- a/usr/src/pkg/manifests/system-test-utiltest.mf +++ b/usr/src/pkg/manifests/system-test-utiltest.mf @@ -54,6 +54,8 @@ file path=opt/util-tests/tests/dis/i386/32.lzcnt.out mode=0555 file path=opt/util-tests/tests/dis/i386/32.lzcnt.s mode=0555 file path=opt/util-tests/tests/dis/i386/32.popcnt.out mode=0555 file path=opt/util-tests/tests/dis/i386/32.popcnt.s mode=0555 +file path=opt/util-tests/tests/dis/i386/32.sha.out mode=0555 +file path=opt/util-tests/tests/dis/i386/32.sha.s mode=0555 file path=opt/util-tests/tests/dis/i386/32.sse-4.2.out mode=0555 file path=opt/util-tests/tests/dis/i386/32.sse-4.2.s mode=0555 file path=opt/util-tests/tests/dis/i386/32.ssse3.out mode=0555 @@ -84,6 +86,8 @@ file path=opt/util-tests/tests/dis/i386/64.popcnt.out mode=0555 file path=opt/util-tests/tests/dis/i386/64.popcnt.s mode=0555 file path=opt/util-tests/tests/dis/i386/64.random.out mode=0555 file path=opt/util-tests/tests/dis/i386/64.random.s mode=0555 +file path=opt/util-tests/tests/dis/i386/64.sha.out mode=0555 +file path=opt/util-tests/tests/dis/i386/64.sha.s mode=0555 file path=opt/util-tests/tests/dis/i386/64.sse-4.2.out mode=0555 file path=opt/util-tests/tests/dis/i386/64.sse-4.2.s mode=0555 file path=opt/util-tests/tests/dis/i386/64.ssse3.out mode=0555 diff --git a/usr/src/test/util-tests/tests/dis/Makefile b/usr/src/test/util-tests/tests/dis/Makefile index cf2b8e3ae7..d75e207eb1 100644 --- a/usr/src/test/util-tests/tests/dis/Makefile +++ b/usr/src/test/util-tests/tests/dis/Makefile @@ -35,6 +35,7 @@ I386_TESTS = \ 32.fma-ss \ 32.lzcnt \ 32.popcnt \ + 32.sha \ 32.sse-4.2 \ 32.ssse3 \ 32.xsave \ @@ -50,6 +51,7 @@ I386_TESTS = \ 64.lzcnt \ 64.popcnt \ 64.random \ + 64.sha \ 64.sse-4.2 \ 64.ssse3 \ 64.vmx \ diff --git a/usr/src/test/util-tests/tests/dis/i386/32.sha.out b/usr/src/test/util-tests/tests/dis/i386/32.sha.out new file mode 100644 index 0000000000..5c5decc25d --- /dev/null +++ b/usr/src/test/util-tests/tests/dis/i386/32.sha.out @@ -0,0 +1,28 @@ + libdis_test: 0f 3a cc c8 01 sha1rnds4 $0x1,%xmm0,%xmm1 + libdis_test+0x5: 0f 3a cc 0b 02 sha1rnds4 $0x2,(%ebx),%xmm1 + libdis_test+0xa: 0f 3a cc 4b 23 03 sha1rnds4 $0x3,0x23(%ebx),%xmm1 + libdis_test+0x10: 0f 3a cc 0c 8b 02 sha1rnds4 $0x2,(%ebx,%ecx,4),%xmm1 + libdis_test+0x16: 0f 38 c8 c8 sha1nexte %xmm0,%xmm1 + libdis_test+0x1a: 0f 38 c8 0b sha1nexte (%ebx),%xmm1 + libdis_test+0x1e: 0f 38 c8 4b 23 sha1nexte 0x23(%ebx),%xmm1 + libdis_test+0x23: 0f 38 c8 0c 8b sha1nexte (%ebx,%ecx,4),%xmm1 + libdis_test+0x28: 0f 38 c9 c8 sha1msg1 %xmm0,%xmm1 + libdis_test+0x2c: 0f 38 c9 0b sha1msg1 (%ebx),%xmm1 + libdis_test+0x30: 0f 38 c9 4b 23 sha1msg1 0x23(%ebx),%xmm1 + libdis_test+0x35: 0f 38 c9 0c 8b sha1msg1 (%ebx,%ecx,4),%xmm1 + libdis_test+0x3a: 0f 38 ca c8 sha1msg2 %xmm0,%xmm1 + libdis_test+0x3e: 0f 38 ca 0b sha1msg2 (%ebx),%xmm1 + libdis_test+0x42: 0f 38 ca 4b 23 sha1msg2 0x23(%ebx),%xmm1 + libdis_test+0x47: 0f 38 ca 0c 8b sha1msg2 (%ebx,%ecx,4),%xmm1 + libdis_test+0x4c: 0f 38 cb ec sha256rnds2 %xmm4,%xmm5 + libdis_test+0x50: 0f 38 cb 2b sha256rnds2 (%ebx),%xmm5 + libdis_test+0x54: 0f 38 cb 6b 23 sha256rnds2 0x23(%ebx),%xmm5 + libdis_test+0x59: 0f 38 cb 2c 8b sha256rnds2 (%ebx,%ecx,4),%xmm5 + libdis_test+0x5e: 0f 38 cc c8 sha256msg1 %xmm0,%xmm1 + libdis_test+0x62: 0f 38 cc 0b sha256msg1 (%ebx),%xmm1 + libdis_test+0x66: 0f 38 cc 4b 23 sha256msg1 0x23(%ebx),%xmm1 + libdis_test+0x6b: 0f 38 cc 0c 8b sha256msg1 (%ebx,%ecx,4),%xmm1 + libdis_test+0x70: 0f 38 cd c8 sha256msg2 %xmm0,%xmm1 + libdis_test+0x74: 0f 38 cd 0b sha256msg2 (%ebx),%xmm1 + libdis_test+0x78: 0f 38 cd 4b 23 sha256msg2 0x23(%ebx),%xmm1 + libdis_test+0x7d: 0f 38 cd 0c 8b sha256msg2 (%ebx,%ecx,4),%xmm1 diff --git a/usr/src/test/util-tests/tests/dis/i386/32.sha.s b/usr/src/test/util-tests/tests/dis/i386/32.sha.s new file mode 100644 index 0000000000..e6d9a32050 --- /dev/null +++ b/usr/src/test/util-tests/tests/dis/i386/32.sha.s @@ -0,0 +1,53 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2016 Joyent, Inc. + */ + +/* + * Test SHA related instructions + */ + +.text +.align 16 +.globl libdis_test +.type libdis_test, @function +libdis_test: + sha1rnds4 $0x1, %xmm0, %xmm1 + sha1rnds4 $0x2, (%ebx), %xmm1 + sha1rnds4 $0x3, 0x23(%ebx), %xmm1 + sha1rnds4 $0x2, (%ebx, %ecx, 4), %xmm1 + sha1nexte %xmm0, %xmm1 + sha1nexte (%ebx), %xmm1 + sha1nexte 0x23(%ebx), %xmm1 + sha1nexte (%ebx, %ecx, 4), %xmm1 + sha1msg1 %xmm0, %xmm1 + sha1msg1 (%ebx), %xmm1 + sha1msg1 0x23(%ebx), %xmm1 + sha1msg1 (%ebx, %ecx, 4), %xmm1 + sha1msg2 %xmm0, %xmm1 + sha1msg2 (%ebx), %xmm1 + sha1msg2 0x23(%ebx), %xmm1 + sha1msg2 (%ebx, %ecx, 4), %xmm1 + sha256rnds2 %xmm4, %xmm5 + sha256rnds2 (%ebx), %xmm5 + sha256rnds2 0x23(%ebx), %xmm5 + sha256rnds2 (%ebx, %ecx, 4), %xmm5 + sha256msg1 %xmm0, %xmm1 + sha256msg1 (%ebx), %xmm1 + sha256msg1 0x23(%ebx), %xmm1 + sha256msg1 (%ebx, %ecx, 4), %xmm1 + sha256msg2 %xmm0, %xmm1 + sha256msg2 (%ebx), %xmm1 + sha256msg2 0x23(%ebx), %xmm1 + sha256msg2 (%ebx, %ecx, 4), %xmm1 +.size libdis_test, [.-libdis_test] diff --git a/usr/src/test/util-tests/tests/dis/i386/64.sha.out b/usr/src/test/util-tests/tests/dis/i386/64.sha.out new file mode 100644 index 0000000000..7dd05bcb72 --- /dev/null +++ b/usr/src/test/util-tests/tests/dis/i386/64.sha.out @@ -0,0 +1,28 @@ + libdis_test: 0f 3a cc c8 01 sha1rnds4 $0x1,%xmm0,%xmm1 + libdis_test+0x5: 0f 3a cc 0b 02 sha1rnds4 $0x2,(%rbx),%xmm1 + libdis_test+0xa: 0f 3a cc 4b 23 03 sha1rnds4 $0x3,0x23(%rbx),%xmm1 + libdis_test+0x10: 0f 3a cc 0c 8b 02 sha1rnds4 $0x2,(%rbx,%rcx,4),%xmm1 + libdis_test+0x16: 0f 38 c8 c8 sha1nexte %xmm0,%xmm1 + libdis_test+0x1a: 0f 38 c8 0b sha1nexte (%rbx),%xmm1 + libdis_test+0x1e: 0f 38 c8 4b 23 sha1nexte 0x23(%rbx),%xmm1 + libdis_test+0x23: 0f 38 c8 0c 8b sha1nexte (%rbx,%rcx,4),%xmm1 + libdis_test+0x28: 0f 38 c9 c8 sha1msg1 %xmm0,%xmm1 + libdis_test+0x2c: 0f 38 c9 0b sha1msg1 (%rbx),%xmm1 + libdis_test+0x30: 0f 38 c9 4b 23 sha1msg1 0x23(%rbx),%xmm1 + libdis_test+0x35: 0f 38 c9 0c 8b sha1msg1 (%rbx,%rcx,4),%xmm1 + libdis_test+0x3a: 0f 38 ca c8 sha1msg2 %xmm0,%xmm1 + libdis_test+0x3e: 0f 38 ca 0b sha1msg2 (%rbx),%xmm1 + libdis_test+0x42: 0f 38 ca 4b 23 sha1msg2 0x23(%rbx),%xmm1 + libdis_test+0x47: 0f 38 ca 0c 8b sha1msg2 (%rbx,%rcx,4),%xmm1 + libdis_test+0x4c: 0f 38 cb ec sha256rnds2 %xmm4,%xmm5 + libdis_test+0x50: 0f 38 cb 2b sha256rnds2 (%rbx),%xmm5 + libdis_test+0x54: 0f 38 cb 6b 23 sha256rnds2 0x23(%rbx),%xmm5 + libdis_test+0x59: 0f 38 cb 2c 8b sha256rnds2 (%rbx,%rcx,4),%xmm5 + libdis_test+0x5e: 0f 38 cc c8 sha256msg1 %xmm0,%xmm1 + libdis_test+0x62: 0f 38 cc 0b sha256msg1 (%rbx),%xmm1 + libdis_test+0x66: 0f 38 cc 4b 23 sha256msg1 0x23(%rbx),%xmm1 + libdis_test+0x6b: 0f 38 cc 0c 8b sha256msg1 (%rbx,%rcx,4),%xmm1 + libdis_test+0x70: 0f 38 cd c8 sha256msg2 %xmm0,%xmm1 + libdis_test+0x74: 0f 38 cd 0b sha256msg2 (%rbx),%xmm1 + libdis_test+0x78: 0f 38 cd 4b 23 sha256msg2 0x23(%rbx),%xmm1 + libdis_test+0x7d: 0f 38 cd 0c 8b sha256msg2 (%rbx,%rcx,4),%xmm1 diff --git a/usr/src/test/util-tests/tests/dis/i386/64.sha.s b/usr/src/test/util-tests/tests/dis/i386/64.sha.s new file mode 100644 index 0000000000..92c9879185 --- /dev/null +++ b/usr/src/test/util-tests/tests/dis/i386/64.sha.s @@ -0,0 +1,53 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2016 Joyent, Inc. + */ + +/* + * Test SHA related instructions + */ + +.text +.align 16 +.globl libdis_test +.type libdis_test, @function +libdis_test: + sha1rnds4 $0x1, %xmm0, %xmm1 + sha1rnds4 $0x2, (%rbx), %xmm1 + sha1rnds4 $0x3, 0x23(%rbx), %xmm1 + sha1rnds4 $0x2, (%rbx, %rcx, 4), %xmm1 + sha1nexte %xmm0, %xmm1 + sha1nexte (%rbx), %xmm1 + sha1nexte 0x23(%rbx), %xmm1 + sha1nexte (%rbx, %rcx, 4), %xmm1 + sha1msg1 %xmm0, %xmm1 + sha1msg1 (%rbx), %xmm1 + sha1msg1 0x23(%rbx), %xmm1 + sha1msg1 (%rbx, %rcx, 4), %xmm1 + sha1msg2 %xmm0, %xmm1 + sha1msg2 (%rbx), %xmm1 + sha1msg2 0x23(%rbx), %xmm1 + sha1msg2 (%rbx, %rcx, 4), %xmm1 + sha256rnds2 %xmm4, %xmm5 + sha256rnds2 (%rbx), %xmm5 + sha256rnds2 0x23(%rbx), %xmm5 + sha256rnds2 (%rbx, %rcx, 4), %xmm5 + sha256msg1 %xmm0, %xmm1 + sha256msg1 (%rbx), %xmm1 + sha256msg1 0x23(%rbx), %xmm1 + sha256msg1 (%rbx, %rcx, 4), %xmm1 + sha256msg2 %xmm0, %xmm1 + sha256msg2 (%rbx), %xmm1 + sha256msg2 0x23(%rbx), %xmm1 + sha256msg2 (%rbx, %rcx, 4), %xmm1 +.size libdis_test, [.-libdis_test] |