Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Data.16ByteAlignment

Posted on 2003-03-04
7
Medium Priority
?
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

721 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