This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A Far Less Ambitous AltiVec patch



On 2 Feb, 2004, at 15.39, Mark Mitchell wrote:


Mark, see my response to Aldy. The generic vector infastructure in inadequate in supporting the AltiVec type system ('vector unsigned ...' vs. 'vector bool ...',
'vector unsigned short' vs. 'vector pixel'), so any generic mangling scheme will likewise be inadequate.

My understanding is that we already have a standard representation of vector types that is common across Altivec/SSE2/etc. In particular, I thought we parameterized vector types based on the mode of the vector contents and the number of elements in the vector. So, we should be able to mangle that in a consistent way.

Except that is not sufficient for AltiVec -- e.g., both 'vector unsigned short' and 'vector bool short' have the same mode of contents and the same # of elements, and yet _must_ be distinct.

If AltiVec actually has types that are indistinguishable in that context, e.g., in the same way that "int" and "long" are indistinguishable on many machines, then, yes, you need to mangle the types, rather than the modes.

Exactly. :-(

But, I can't see why we can't just define a common mangling for "vector of N elements of type T". That would be useful for other architectures as well.

Perhaps I snould add a, say, '-maltivec-mangle' option, and then then have -faltivec map to -maltivec + -maltivec-mangle ? Then, '-maltivec' users will still get the generic mangling. What do you think?


--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]