Re: [AD] More AMD64 stuff |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
(hmm... send this too the wrong list first it seems...)
Good stuff this time :)
The attached patch makes the configure script recognize the AMD64 as a
processor type, and it adds a hook for allowing AMD64 optimized assembler
code. It also adds an ALLEGRO_AMD64 preprocessor symbol.
This portion of the patch is IMO certainly clean enough for 4.2. The next
part I think as well, but I want a second opinion here.
i have .26 of a clue about what this is about, but im always ready to
offer opinion ;>
i think its a great idea, now code can be added inside a #ifdef
ALLEGRO_AMD64 that can presume such things as SSE status, and alignment
stuff can be hidden in there too so as not to disturb those i386
memory deprived ludites. :p
Currently, the only thing this is used for is to port over the CPU
identification code. This seems to work like a charm, but I'm not too
comfortable with the way I had to grab the arguments passed to the
function: %rdi gets the first argument, %rsi gets the second one. I did
some googling and checking around and this does seem to be normal (and it
certainly simplifies the code significantly), but I'd like to hear more
opinions on it.
clue: 0.0% sorry i have absolutely zero understanding of this %rdi thingy.
It should be possible to port over the existing assembler code in a fairly
generic way, but I don't think that's worthwhile: the 64 bit output from
gcc is probably better than the hacked-ported code that would result from
the i386 code.
i tend to think its best left upto the compiler if possible.
in MSVC7 intrinsics can be used to make nice C-like code that uses
mmx/sse instructions. does GCC support them?
intel compiler i think does (which is where i think M$ got the idea from)
The patch also includes an improved version of my previous patch for the
test programme so that it displays "CPU family: AMD64 / a hole range of
capabilities".
excellent work!
hoorah!
whats with the sprintf and strcat ?
my spelling usually contains 'N's
aj.