Thanks for the useful info. I know supporting decade-old CPUs is the
lowest possible priority for you, but as a hobby project, learning
about the JIT and the instructions added from Power ISA v2.01 to today
was very educational. A few small questions about the code:
- The ARM and PPC CPU model detection in src/base/cpu.cc is using
getauxval() on Linux on glibc 2.16 or newer, but opening
"/proc/self/auxv" by hand otherwise, and then stepping through the ELF
auxv list entries. Is there a good reason why a version of glibc from
Mar. 2012 is still supported in the current codebase? The code is
cleaner if I can just assume PPC on Linux is at least glibc 2.18
(released Aug. 2013), for AT_HWCAP2 (or musl libc), but I can keep the
"/proc/self/auxv" code if there's a good reason for it.
- Is there a way on AIX to detect POWER5+ vs. POWER5? It's only
useful to know for the "isel" instruction. I also notice there's no
default POWER value if it doesn't recognize the value of
"_system_configuration.implementation", so it doesn't get properly
handled. Should that case statement default to POWER_10 (assuming it's
something newer), POWER_5 (for safety), or something in between?
BTW, please ignore my claim that I figured out a better code path to
byte swap reverse a 64-bit integer. I tested my version and it failed
some test cases, and I'm guessing it's because the code I copied from
GCC only works when the input and output registers are different. In
the case where they're the same, you do need three scratch registers
instead of two to hold all the temp values. The CPU simulator really
saves a lot of time.
Regards,
Jake Hamby