This is the mail archive of the gcc@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]

Re: GCC MMX PATCH


On Tue, 3 Mar 1998, John Carr wrote:
> Some comments:
> 
> Check out the Sun VIS SDK for a similar conecpt.  Sun's compiler has
> inline assembly but the format is much different.

I did, the assembly samples should be in vis*.il. For some reason, Sun
does not have a reference manual for VIS. :( I think I can abstract it out
for simd.h. I believe GCC extensions should generate code better than
Sun's compiler (able to avoid unnecessary register transferring and
spills).

Heck, I can generate better and more readble MMX code with GCC than hard
core assembly (okay so I can't take advantege of mode m just yet :) 

> You need a target macro to enable MMX.  When it is clear
> REG_CLASS_FROM_LETTER('x') must return NO_REGS.

Okay, I just don't see the point because you have explicitly use the 'x'
constraint (in asms) before you can take advantage of it. Still, might be
worthwhile. 

> gcc needs to enforce the rule that floating point and MMX don't mix.

That is WAYYYYYYY out of my league. I have some idea how to do it but it
will require massive changes to reg-stack.c. I don't know if this is worth
it. Even if it is, I don't know if it should be implemented in 2.8.* or
egcs. Richard Kenner has not got back to me on 2.7.*

As it is, you can only use MMX within a leaf function (strictly no FP). If
you have any idea how I can enforce the FP/mmX rule this easily let me
know. 
 
> You probably need register classes for general registers + MMX registers
> because gcc will want to use such a class for DImode values.  You don't
> need a constraint letter for these classes.

I dunno about this since I am very new to rtl/md. My goal is to hide the
existing of MMX form GCC regular insn as much as possible, i.e. to use the
MMX registers you *MUST* explicitly use in inline assembly. 
 
> If you plan to do anything for UltraSPARC VIS, check with me first.

Actually I do. If you want, you can do it (I am busy with my projects :(. 
If you untar the file from VIS homepage, there should be vis*.il
somewhere. Look at my 'simd.h'. This is the GENERIC interface for SIMD
instructions. You should be able to encode simd.h for UltraSparcs without
any braindead patches. You have to decide if 32-bit word or 64-bit word is
more efficient (I think 32-bit is quicker the last the time tested them). 

Thanks for replying. Hope to hear from you soon.

Hasdi




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