[uae] Re: 'New' bsdsocket emulation (was Re: A bit of static/extern problems with GNU GCC 4.0.0)

  • From: Richard Drummond <evilrich@xxxxxxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Mon, 13 Jun 2005 12:24:47 -0500

Hi

On Monday 13 June 2005 05:09 am, anarkhos@xxxxxxxxxxx wrote:
> I've spared myself knowledge of such differences for the most part. The
> whole situation is ridiculous IMO. Apple took a short-cut to avoid changing
> their build tools and we're still paying for it. It doesn't even use the
> proper PPC SYSV ABI.

I always wondered why they hung on to the Mach-O binary format. About the only 
advantage it is has over ELF is support for fat binaries. Of course, now its 
obvious why they wanted fat binaries. ;-)

> It certainly hasn't made it easy for the guys trying to port QEMU's ABI
> emulation layer.

Hmm. Yes. Rather them than me. ;-)

> Like what? :)

Well, the problem is how to call AmigaOS functions from the emulator. The 
solution at the moment is the 'stack-magic' code, which creates a new stack 
frame and thus makes it possible to swap to a new stack context to execute an 
AmigaOS call and then swap the stack back to resume the emulator code. It's 
kinds of like setjmp/longjmp with knobs on. ;-)

A more portable method to do this, at least SYSV-compatible operating systems, 
might be to use makecontext/swapcontext.

A better idea all together would be make the CPU emulation re-entrant, so all 
this nonsense shouldn't be necessary. There's still some way to go to achieve 
this yet.

> BTW: You have less than a year to add PowerUp support ;)

Hehe. It's on my list of things to do.

> I'm sorry if I haven't been working on e-uae OS X, but I've been busy
> working on Darwine since Apple's announcement. Learning some nitty-gritty
> about OS X's event handling and graphics. Not too dissimilar to what e-uae
> needs to squeeze out some better performance and compatibility.

That's an interesting project. Good luck with it.

> Anyway, thanks a lot Richard. I'll find some time to test your changes
> later this week.

You're welcome.

Cheers,
Rich

Other related posts: