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

Support PowerPC64 architecture #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

runlevel5
Copy link

Changes

  • Support PowerPC64 Little Endian
  • Support PowerPC64 Big Endian


#if idppc || idppc64
static void Sys_GetProcessorId( char *vendor )
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To address the build error:

/home/tle/Work/ETe/src/qcommon/common.c:3622:13: error: redefinition of ‘Sys_GetProcessorId’
 3622 | static void Sys_GetProcessorId( char *vendor )
      |             ^~~~~~~~~~~~~~~~~~

@@ -113,6 +119,10 @@ if(APPLE AND X86_64)
set(compiler_flags_release ${compiler_flags_global})
elseif(X86_64)
set(compiler_flags_release ${compiler_flags_global})
elseif(PPC64LE)
set(compiler_flags_release ${compiler_flags_global} -mcpu=power8)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

POWER8 is the first to support Little Endian. This is the lowest common value for all CPUs that supports LE for example POWER8, POWER9 and POWER10

ref: https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.0?topic=options-mcpu

elseif(PPC64LE)
set(compiler_flags_release ${compiler_flags_global} -mcpu=power8)
elseif(PPC64)
set(compiler_flags_release ${compiler_flags_global} -mcpu=powerpc64)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback to generic 64bit PPC64 if not LE

@runlevel5 runlevel5 marked this pull request as ready for review August 15, 2023 03:10
@runlevel5 runlevel5 changed the title Support PowerPC64 architecture [WIP] - DO NOT REVIEW! Support PowerPC64 architecture Aug 15, 2023
@ensiform
Copy link
Member

ensiform commented Aug 16, 2023

I will consider it but keep in mind that there will be zero support on any 3rd party servers or existing mods that lack ppc/ppc64 support as ET does not use QVM like Q3A.

Also is there a reason you need to "force" with -mcpu? Shouldn't it be active if compiling on such target machine?

@runlevel5
Copy link
Author

I will consider it but keep in mind that there will be zero support on any 3rd party servers or existing mods that lack ppc/ppc64 support as ET does not use QVM like Q3A.

Yes I am fully aware of that. This is mainly for PowerPC community to host their own LAN games

Also is there a reason you need to "force" with -mcpu? Shouldn't it be active if compiling on such target machine?

Well, if not specified, the value of mcpu would be determined with GCC configuration. However it's recommended to specify this parameter explicitly for many reasons, one of that is backward-compatibility, for example if compiling on a POWER9 machine, the -mcpu would be set to power9 which has instructions that are not compatible with POWER8 machine

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

Successfully merging this pull request may close these issues.

2 participants