Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Darwin PowerPC #278

Open
barracuda156 opened this issue Dec 29, 2023 · 4 comments
Open

Restore Darwin PowerPC #278

barracuda156 opened this issue Dec 29, 2023 · 4 comments
Assignees
Labels

Comments

@barracuda156
Copy link

@rptb1 @gareth-rees
Could we restore PowerPC support? It evidently existed at some point: https://github.com/Ravenbrook/mps/tree/branch/2007-12-19/vmarenagrow
However, the present version of configure is unaware of ppc and ppc64 on macOS.

@gareth-rees
Copy link
Member

gareth-rees commented Dec 30, 2023

The problem with restoring support for the xcppgc platform is—how would we test it? The last PowerPC Macintoshes were manufactured in 2006, or thereabouts, so I guess we'd have to use an emulator. The last version of OS X to support PowerPC was 10.5 (Leopard) which we no longer support either, so this would be a lot of work, I think too much for us to realistically undertake it.

However, if you already have the hardware and the operating system, it would not be too difficult to implement your own support for this platform. The Porting the MPS chapter of the manual has an outline for how to do it.

I would start by copying the xci6gc implementation, where the only Intel-specific modules are the Mutator Context modules (prmci6.c and prmcxci6.c), and most of the functions are only used for optimizations, so you can start with the generic versions in prmcanan.c, leaving you (I think) only needing to implement the function MutatorContextSP in the new module prmcxcpp.c.

@rptb1
Copy link
Member

rptb1 commented Jan 2, 2024

The PowerPC platform was removed in Perforce changelist 178908 on 2012-08-12 which corresponds to Git commit 9e14923 . You can see there what was removed. The changelist resolved these issues:

job000599 on 2013/03/19 by nb closed

MPS doesn't build on Mac OS X 10.2

job000601 on 2013/03/19 by rb closed

MPS compile fails under Mac OS X 10.2

job001146 on 2013/03/19 by drj closed

MPS does not implement a stack scanner for OS X / PowerPC

job001543 on 2013/03/19 by rhsk closed

MPS mpsicv (test) on OS X does not use reg&stack scanner.

job001544 on 2013/03/19 by rhsk closed

MPS mpsicv coverage test source does not have ifndef CONFIG_PF_XCI3GC

job001634 on 2014/04/12 by drj closed

MPS fails under Rosetta.

job001635 on 2012/08/15 by drj closed

On Unix, signal handler is not installed correctly.

job001714 on 2013/03/19 by rhsk closed

MPS xcppgc (Mac OS X PowerPC) is built with outdated compiler flags

You can look up the job details, which include some analysis of issues, at e.g. https://www.ravenbrook.com/project/mps/issue/job000599/ .

It's quite likely that you can reinstate these with little to no modification but you'll also be reinstating those issues!

macOS PowerPC was a combination I used for many years on my desktop to develop and debug the MPS, but it was never a supported platform in deployment, so it has not been exposed and hardened to real world use.

If you're thinking of a different PowerPC target, I'd be interested to hear about it. I'm also interested in why you want this.

If you get it working perhaps you could note details here for other people.

Thanks!

@rptb1 rptb1 added the question label Jan 2, 2024
@rptb1 rptb1 self-assigned this Jan 2, 2024
@barracuda156
Copy link
Author

@rptb1 Thank you, this is very informative!

Yes, I consider macOS PowerPC myself, though admittedly Linux and possibly FreeBSD have a wider audience. Why – well, I have hardware, and late G5 are nice to use even today, and also we support PowerPC systems in Macports.

@rptb1
Copy link
Member

rptb1 commented Jan 2, 2024

Please do ask questions here if you decide to hack on this. We'll try to answer, though our resources are limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants