Code Monkey home page Code Monkey logo

Comments (17)

barracuda156 avatar barracuda156 commented on June 20, 2024 2

@classilla A bit offtop, just want to share a success: just built tenfourfox on 10.6 PPC in Macports (I have adapted an earlier work of @kencu to PPC).

P. S. Just noticed my RAM got cooked – been wondering why is it so slow LOL
TFF_10 6

from tenfourfox.

kencu avatar kencu commented on June 20, 2024 1

the newer gcc issues were being tracked here #464 but we stopped a few years ago, so nobody tried gcc10 or gcc11.

from tenfourfox.

iains avatar iains commented on June 20, 2024 1

note that TFF has "10.4" in the title, and 10.4 has very little support for ppc64 (essentially nothing beyond the base libs; no frameworks, no objc .. ) so I would not expect something targeting 10.4 to be useful for a ppc64 case.

from tenfourfox.

classilla avatar classilla commented on June 20, 2024 1

It would need to be written from scratch. The one I'm writing for POWER9 is little-endian and specific to that ISA level.

from tenfourfox.

iains avatar iains commented on June 20, 2024 1

it’s not the toolchain exactly, or Apple documentation, or ABI.

the code itself has conditional compilation for systems, endianness, and bit depth. All different paths.

a pathway for darwin big endian 64bit was never written into the code, far as I recall it.

To avoid any confusion : PowerPC Darwin is always Big Endian (32 and 64B),

AFAIK the only LE Power systems are ELF (v2) and for Power >= 9 (ICBW, maybe Power 8 is also covered).

from tenfourfox.

kencu avatar kencu commented on June 20, 2024 1

yeah, pre-coffee brainfart after reading Cameron's comment; I changed it to BE 10 seconds after I wrote that, and went 'What -- no'. :>

from tenfourfox.

classilla avatar classilla commented on June 20, 2024 1

By 'from scratch' I mean it's probably a bit more than a few tweaks or other trivial changes. Yes, the code runs on the 970 except for things like mcrxr. However, it is inherently 32-bit, all calling conventions are 32-bit, JIT entry and exit uses 32-bit, etc. There are also relatively few 64-bit operations that the JIT performs that would benefit. Even current versions of Firefox mostly deal in 32-bit ints other than bignums, which TenFourFox's JavaScript doesn't support.

The POWER9 JIT (for the record, POWER8 also supports LE, POWER7 sort of) is fully 64-bit. Some code was used as a template, but it's been almost completely redone to make it 64-bit clean. Even then I'm still banging bugs out of it, mostly with sign extension and 32-bit thunking.

from tenfourfox.

classilla avatar classilla commented on June 20, 2024 1

No, it doesn't use V8.

from tenfourfox.

barracuda156 avatar barracuda156 commented on June 20, 2024

note that TFF has "10.4" in the title, and 10.4 has very little support for ppc64 (essentially nothing beyond the base libs; no frameworks, no objc .. ) so I would not expect something targeting 10.4 to be useful for a ppc64 case.

@iains Honestly I don’t know if support for 10.4 implies that ppc64 variant should be impossible. Included profiles to be used for the build have dedicated G5 versions: https://github.com/classilla/tenfourfox/blob/master/G5.mozcfg
But those nevertheless use -m32 flags.

from tenfourfox.

classilla avatar classilla commented on June 20, 2024

I don't know, I've never tried personally. The reason the G5 version is built in 32-bit mode is because of the JIT, which definitely won't work in 64-bit mode (also, assuming you're building this for Mac OS X, TenFourFox has some legacy Carbon code).

from tenfourfox.

barracuda156 avatar barracuda156 commented on June 20, 2024

I don't know, I've never tried personally. The reason the G5 version is built in 32-bit mode is because of the JIT, which definitely won't work in 64-bit mode (also, assuming you're building this for Mac OS X, TenFourFox has some legacy Carbon code).

@classilla Thank you! The JIT is this one? js/src/jit/osxppc
Given that neighboring mips has both 32- and 64-bit versions, I would imagine ppc64 to be feasible, though I dunno how much effort that could require.

from tenfourfox.

barracuda156 avatar barracuda156 commented on June 20, 2024

It would need to be written from scratch. The one I'm writing for POWER9 is little-endian and specific to that ISA level.

@classilla Oh… I had an impression that as far as Darwin goes, ppc and ppc64 aren’t hugely different. Few assembler instructions should be replaced, in a predictable fashion, and maybe handling of 64-bit numbers (takes more instructions on ppc32?). ABI documentation does not seem to suggest huge differences. Well, r13 is used for some thread-related stuff on ppc64.

But @iains noted earlier that Apple documentation is incomplete, so I guess I miss something here.

from tenfourfox.

kencu avatar kencu commented on June 20, 2024

it’s not the toolchain exactly, or Apple documentation, or ABI.

the code itself has conditional compilation for systems, endianness, and bit depth. All different paths.

a pathway for darwin big endian 64bit was never written into the code, far as I recall it.

from tenfourfox.

barracuda156 avatar barracuda156 commented on June 20, 2024

The POWER9 JIT (for the record, POWER8 also supports LE, POWER7 sort of) is fully 64-bit. Some code was used as a template, but it's been almost completely redone to make it 64-bit clean. Even then I'm still banging bugs out of it, mostly with sign extension and 32-bit thunking.

@classilla Why a choice of LE btw? All POWER CPUs support BE.

from tenfourfox.

classilla avatar classilla commented on June 20, 2024

Largely convenience. There are relatively few Linux distros that still offer spins with BE support, and they tend to be more fringe. Plus, TenFourFox has a lot of hacks for a Web that now assumes little-endian (little endian typed array emulation being the most notable). I like BE personally and when I upgrade my server to POWER whatever-is-current I'll probably try to run it big with FreeBSD or something, but the desktop experience is better with Linux IMHO, and it's just simpler to run it LE.

from tenfourfox.

barracuda156 avatar barracuda156 commented on June 20, 2024

I like BE personally and when I upgrade my server to POWER whatever-is-current I'll probably try to run it big with FreeBSD or something, but the desktop experience is better with Linux IMHO, and it's just simpler to run it LE.

I am planning to install FreeBSD 13 as a second system into my G5 Quad in fact. There is a nice GUI for FreeBSD, quite MacOS-like: https://github.com/helloSystem

P. S. From what I understand, even ELF2 can be used in BE mode. No good reason to downgrade to LE.

from tenfourfox.

barracuda156 avatar barracuda156 commented on June 20, 2024

@classilla Not to create a separate topic: does TFF use v8-related or similar code? I am trying to fix nodejs12 for Darwin PPC :)

from tenfourfox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.