Re: [AD] [BUG] ccolconv.c void * arith.

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


On Sunday 10 April 2005 23:52, Matt Witherspoon wrote:
> With the change, Allegro compiles great under MSVC except that there is
> still the dependency on /win/asmlock.s (unless this has changed in CVS 
since
> I last checked). I attempted to write a C replacement, however, I totally
> borked it. If someone could write a replacement (or even inline the asm),
> then it should build completely in MSVC perfectly as everything else
> _appears_ to be working. It should be a fairly simple fix for someone who
> knows the stuff (not me).

Argh! I should try to remember these things when they are explained to me! 
On a previous discussion on the subject Eric explained why this is so and 
cannot be changed. I'll try to remember what he said, or I can search for 
his original message later.

The bank switchers pass their arguments in a special way (using registers I 
think). Writing a C only replacement for this that does it in a more 
traditional way leads to an incompatible DLL between the C and C/asm 
version of the library, which is obviously undesirable (I'm not sure why 
this problem doesn't occur in Linux though, if indeed it doesn't). The 
only work-around that I can see involves writing inlining assembler code 
for MSVC, or changing the bankswitchers *now* to always use a calling 
convention compatible with the C library - since we are going to release a 
new stable version, the DLL ABI compatibility is not an issue.
That said, this is a major change that affects all platforms, not just 
Windows and something such a large scope that we should not want to do at 
this stage in 4.2 development. For 4.3, I think it makes sense to look 
into changing this.

Evert




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