Bug 244428 - base system objdump 2.17.50 can't disassemble x86 SHA instructions
Summary: base system objdump 2.17.50 can't disassemble x86 SHA instructions
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks: 229046
  Show dependency treegraph
 
Reported: 2020-02-26 10:21 UTC by Jeffrey Walton
Modified: 2023-12-27 16:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Walton 2020-02-26 10:21:39 UTC
I'm testing on FreeBSD. I know little to nothing about the operating system.

I have a couple of source files that use x86 SHA intrinsics. See https://github.com/noloader/ldns/blob/develop-sha/sha1.c and https://github.com/noloader/ldns/blob/develop-sha/sha256.c.

Attempting to verify the code generation results in the following. It is mostly garbage.

$ objdump -d sha1.o
...

0000000000001170 <ldns_sha1_transform_x86>:
    1170:	66 0f 6f 25 00 00 00 	movdqa 0x0(%rip),%xmm4        # 1178 <ldns_sha1_transform_x86+0x8>
    1177:	00 
    1178:	f3 0f 6f 06          	movdqu (%rsi),%xmm0
    117c:	66 0f ef db          	pxor   %xmm3,%xmm3
    1180:	f3 0f 6f 17          	movdqu (%rdi),%xmm2
    1184:	66 0f 3a 22 5f 10 03 	pinsrd $0x3,0x10(%rdi),%xmm3
    118b:	f3 0f 6f 7e 10       	movdqu 0x10(%rsi),%xmm7
    1190:	66 0f 38 00 c4       	pshufb %xmm4,%xmm0
    1195:	f3 44 0f 6f 4e 20    	movdqu 0x20(%rsi),%xmm9
    119b:	66 0f 70 d2 1b       	pshufd $0x1b,%xmm2,%xmm2
    11a0:	66 0f 6f cb          	movdqa %xmm3,%xmm1
    11a4:	f3 44 0f 6f 46 30    	movdqu 0x30(%rsi),%xmm8
    11aa:	66 0f fe c8          	paddd  %xmm0,%xmm1
    11ae:	66 0f 6f f2          	movdqa %xmm2,%xmm6
    11b2:	66 0f 38 00 fc       	pshufb %xmm4,%xmm7
    11b7:	0f 3a cc             	(bad)  
    11ba:	f1                   	icebp  
    11bb:	00 66 0f             	add    %ah,0xf(%rsi)
    11be:	6f                   	outsl  %ds:(%rsi),(%dx)
    11bf:	ea                   	(bad)  
    11c0:	66 0f 6f cf          	movdqa %xmm7,%xmm1
    11c4:	0f 38 c8             	(bad)  
    11c7:	ef                   	out    %eax,(%dx)
    11c8:	66 0f 6f fe          	movdqa %xmm6,%xmm7
    11cc:	66 44 0f 38 00 cc    	pshufb %xmm4,%xmm9
    11d2:	0f 3a cc             	(bad)  
    11d5:	fd                   	std    
    11d6:	00 41 0f             	add    %al,0xf(%rcx)
    11d9:	38 c8                	cmp    %cl,%al
    11db:	f1                   	icebp  
    ...
Comment 1 Ed Maste freebsd_committer freebsd_triage 2020-05-05 18:59:54 UTC
Can you try with llvm-objdump?
Otherwise, please install the binutils port or package.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2020-05-07 21:25:33 UTC
objdump 2.17.50 has now been removed for FreeBSD 13