Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Compiler
Delphi
Anonymous Methods
BASM
Code Generation/Optimization
Error Recovery
Errors - Warnings
Exceptions
Execution
Finalization
Generics
Header Generation
Interaction with UI
Interfaces
Language
Linker
Make Logic
Memory Manager
OBJ Generation
OBJ Support
Other Compiler
Packages
RTTI
String Resources
TD Debug Info
Thread Local Storage
Version resilience
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Compiler/Delphi/BASM
[ Add a report in this area ]
Report #:
75206
Status:
Closed
Incorrect CodeGen for SSSE3 and SSE4 instructions
Project:
Delphi
Build #:
12.0.3420.21218
Version:
12.1
Submitted By:
Philipp S
Report Type:
Crash / Data loss / Total failure
Date Reported:
6/24/2009 2:13:41 AM
Severity:
Commonly encountered problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
270416
Resolution:
Fixed
(Resolution Comments)
Resolved in Build:
:
14.0.3467.22472
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
10
Description
The compiler/assembler generates wrong machine code for all SSSE3, all SSE4.1 and some SSE4.2 instructions (all except POPCNT) when these instructions are used with certain register addressing combinations, i.e.
SOMEINSTRUCTION register, [register+register]
SOMEINSTRUCTION register, [register*scale]
SOMEINSTRUCTION register, [register+register*scale]
(E.g., try the combinations "[ECX+ESI]" or "[ECX*4]").
As far as I can see, the instructions affected are:
PMOVZX.., PMOVSX.., ROUND.., DPPS/DPPD, PMULDQ.., PMULLD.., EXTRACTPS, INSERTPS, BLENDV.., PMIN.., PMAX.., MPSADBW.., PHMINPOSUW, PTEST, PCMPEQQ, PACKUSDW, CRC32, PCMPGTQ, PCmpXStrX, PALIGNR, PHADD..., PABS..., PMADDUBSW, PMULHRSW, PSHUFB, and PSIGN...
This is apparently related to QC report 73742 for PMOVZXBW (which I can't access).
See also:
https://forums.embarcadero.com/thread.jspa?threadID=19508&tstart=0
and
https://forums.embarcadero.com/thread.jspa?threadID=16359&tstart=15
Steps to Reproduce:
Example:
asm
ret //Put a breakpoint here and inspect disassembly/machine code
pshufb xmm0, [ecx+esi] //WRONG
nop; nop; nop; nop; nop; nop;
pshufb xmm0, [esi+ecx*4] //WRONG
nop; nop; nop; nop; nop; nop;
pshufb xmm0, [ecx*4] //WRONG
nop; nop; nop; nop; nop; nop;
end;
Please have a look at the attached source code file, which includes similar cases for all affected SSSE3, SSE4.1 and SSE4.2 instructions that I found.
Workarounds
None
Attachment
75206.zip
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