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 #:
87610
Status:
Open
BASM DD and DQ do not handle floating point values correctly
Project:
Delphi
Build #:
14.0.3539.24502
Version:
14.0
Submitted By:
Philipp S
Report Type:
Basic functionality failure
Date Reported:
8/28/2010 2:19:42 PM
Severity:
Serious / Highly visible problem
Last Updated:
3/20/2012 2:24:39 AM
Platform:
All platforms
Internal Tracking #:
280216
Resolution:
None
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
5
Description
DD and DQ are used to declare 32-bit/DWORD and 64-bit/QWORD-sized data, respectively. BASM allows (u)int32 and (u)int64 data to be declared correctly: However, DD and DQ do not handle the declaration of 32-bit SINGLE-precision floating-point and 64-bit DOUBLE-precision floating-point values correctly.
Steps to Reproduce:
Inspect the code generated for the following instructions.
Expected: 0.5 and 1/2 should be treated as single values after DD and double values after DQ
Observed: 0.5 and 1/2 are treated as (different!) integer values
asm
jmp @x
@OneHalfDW1:
dd 0.5 // actually, the compiler treats this as 05h integer
@OneHalfDW2:
dd 1/2 // actually, the compiler treats this as 00h integer
@OneHalfDQ1:
dq 0.5 // actually, the compiler treats this as 05h integer
@OneHalfDQ2:
dq 1/2 // actually, the compiler treats this as 00h integer
@x:
movss xmm0, dword ptr @OneHalfDW1
movss xmm1, dword ptr @OneHalfDW2
movsd xmm2, qword ptr @OneHalfDQ1
movsd xmm3, qword ptr @OneHalfDQ2
int 3 // inspect values in xmm0 - xmm3 in FPU view, and also the data inserted for the DDs and DQs
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