Re: [AD] x color conversion again

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> > Well, the 16 was my idea, since the original code said:
> >
> > #define LOCAL1   -4(%esp)
> > #define LOCAL2   -8(%esp)
> > #define LOCAL3   -12(%esp)
> > #define LOCAL4   -16(%esp)
> 
> Then it's a minor mistake ;-)  The non-MMX code only declares 3 local
> variables so the frame is 12-byte large, not 16-byte large.
> 

Yes, I was unsure of that comment about an "additional push" I didn't
find, so used 16 there as well :P

> > So I assumed adding 16 would be the way to fix it. I must admit, I'm not
> > sure what you mean with 16-byte alignement. Does it mean, I can use
> > something like -4(%esp) if and only if %esp is 16-byte aligned?
> 
> This means that, at any time (especially on interrupt boundaries and context
> switches), the value of %esp must be a multiple of 16.  So you can only
> add or subtract multiples of 16 to %esp.
> 

In case you missed it, Bob replied (outside of this thread) that: "%esp
only needs to be aligned to 4-byte boundaries." But maybe this is only
when not using MMX? In any case, I have no idea about it. But there
should probably go a comment into the code telling the assumed stack
alignement in any case.

> > SPILL_SPOT would be sort of a temp variable?
> 
> Yes, but uninitialized by the setup code.
> 
> I'll try to write something in the next few days.
> 

Ok, great.

Evert: I think we should wait for this with the 4.1.15 release.

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/