?
Solved

Data.16ByteAlignment

Posted on 2003-03-04
7
Medium Priority
?
178 Views
Last Modified: 2010-04-04
I'm using Delphi 6.0, in particular the integrated assembler. To use MMX-registers tidy, I have to declare data in Delphi with alignment at 16 byte boundary.
The compiler directive {$A...} submits alignments up to 8 byte.
Is there a possibility to enforce 16-byte alignment in Delphi?
0
Comment
Question by:pkupzow
7 Comments
 
LVL 4

Expert Comment

by:cjm30305
ID: 8067567
I think the highest is only 8 byte or 32 bit allignment.  16 byte or 64 bit allignment would require a 64 bit processor, I think...  Somebody correct me if I am wrong here cause I would like to know also.

Cheers.
0
 
LVL 4

Expert Comment

by:cjm30305
ID: 8067587
Math is off today, got my head in my azz so don't listen to me today....

I am going home to get some more sleep.

Cheers.
0
 
LVL 6

Expert Comment

by:swift99
ID: 8069621
A byte alignment algorithm was published in the original Kernighan and Ritchie 'C' manual.

If that is not available to you, check out HPMM (High performance Memory Manager) that is free download from Borland site and possibly Torry's pages (www.torry.com)

HPMM depends on byte alignment to give most of its performance boost over the default Delphi memory manager.  It looks to me like this is configurable, so some minor tweaks to constants should allow you to ensure that dynamically created heap variables are aligned on a 16 byte boundary.  

8 byte boundary may not be accessible to stack based (local) variables, which may be sensible since MMX data is typically much larger than you want on your stack.

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Expert Comment

by:CleanupPing
ID: 9316945
pkupzow:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 10033447
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

PAQ'd and pts refunded

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
P.S.
  swift99, I don't know whether or not yours was a solution. Pls comment.
0
 
LVL 6

Expert Comment

by:swift99
ID: 10044504
I think that we can classify this as abandoned.  It looks like he didn't have enough sleep, asked the question, then figured out the answer.
0
 

Accepted Solution

by:
SpazMODic earned 0 total points
ID: 10087178
PAQed, with points refunded (75)

SpazMODic
EE Moderator
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question