Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Debugger
Breakpoints
Call Stack
Corba DBK
Corba UI
CPU
Debugger UI
Evaluator
Evaluator ToolTips
Evaluator View
Event Log View
Exceptions
Execution
FPU
Inspector
Interaction with IDE
Kernel
Local Variables View
Module View
Multi-process
Remote Debugging
Stepping
TD32 Keys
Thread View
Watches
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Debugger/CPU
[ Add a report in this area ]
Report #:
68693
Status:
Closed
SSSE3 Instructions PMULHRSW is Disassembled Incorrectly
Project:
Delphi
Build #:
3210
Version:
12.0
Submitted By:
Dennis Christensen
Report Type:
Minor failure / Design problem
Date Reported:
11/7/2008 2:33:12 AM
Severity:
Infrequently encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
266421
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
14.0.3367.20128
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
The SSSE3 instruction PMULHRSW is disassembled incorrectly.
Unit1.pas.112: pmulhrsw xmm0, xmm1
660F380BC166 palignr xmm0,xmm1,$66
The Intel reference manual
http://download.intel.com/design/processor/manuals/253667.pdf
p. 4-184
Opcode Instruction 64-Bit
Mode
Compat/
Leg Mode
Description
0F 38 0B /r PMULHRSW
mm1, mm2/m64
Valid Valid Multiply 16-bit signed
words, scale and round
signed doublewords, pack
high 16 bits to MM1.
66 0F 38 0B /r PMULHRSW
xmm1,
xmm2/m128
Valid Valid Multiply 16-bit signed
words, scale and round
signed doublewords, pack
high 16 bits to XMM1.
It looks like the opcode is correct and the bug is in the CPU view disassembler.
The version operating on MMX registers has the same problem
Unit1.pas.115: pmulhrsw mm0, mm1
00465FE8 0F380BC10F palignr xmm0,xmm1,$0f
Steps to Reproduce:
Make a new Win32 Delphi VCL project and add this code.
TWord128 = packed record
I1,I2,I3,I4,I5,I6,I7,I8 : SmallInt;
end;
function SSSE3_PMULHRSW(var Word128a, Word128b : TWord128) : TWord128;
asm
movupd xmm0, [Word128a]
movupd xmm1, [Word128b]
pmulhrsw xmm0, xmm1
movupd [Result], xmm0
end;
procedure TForm1.Button3Click(Sender: TObject);
var
Word128a, Word128b, ResWord128 : TWord128;
begin
Word128a.I1 := 1 shl 8;
Word128a.I2 := 2 shl 8;
Word128a.I3 := 3 shl 8;
Word128a.I4 := 4 shl 8;
Word128a.I5 := 5 shl 8;
Word128a.I6 := 6 shl 8;
Word128a.I7 := 7 shl 8;
Word128a.I8 := 8 shl 8;
Word128b.I1 := 1 shl 8;
Word128b.I2 := 2 shl 8;
Word128b.I3 := 3 shl 8;
Word128b.I4 := 4 shl 8;
Word128b.I5 := 5 shl 8;
Word128b.I6 := 6 shl 8;
Word128b.I7 := 7 shl 8;
Word128b.I8 := 8 shl 8;
ResWord128 := SSSE3_PMULHRSW(Word128a, Word128b);
end;
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us