RFR(L): 8161259: Simplify including platform files.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Jul 14 08:49:52 UTC 2016


this change simplifies the include cascades used to include
platform headers.

The direcitves
are replaced by

In utilities/macros.hpp there are macros that use these
two defines and constuct platform header names from them.

So this cascade:
  #ifdef TARGET_ARCH_x86
  # include "assembler_x86.hpp"
  #ifdef TARGET_ARCH_sparc
  # include "assembler_sparc.hpp"
  #ifdef TARGET_ARCH_zero
  # include "assembler_zero.hpp"
  #ifdef TARGET_ARCH_arm
  # include "assembler_arm.hpp"
  #ifdef TARGET_ARCH_ppc
  # include "assembler_ppc.hpp"
  #ifdef TARGET_ARCH_aarch64
  # include "assembler_aarch64.hpp"
now is replaced by this one include
  #include cpu_header(assembler)

One problem with the macros is that there exist macros
'linux' and 'sparc' (lowercase!). Therefore using INCLUDE_SUFFIX_OS etc
fails in this two cases. Luckily, with the new setup, special
casing for this can all be done in macros.hpp.

There are some places where above old TARGET_... macros were used
for other purposes than guarding the includes, I replaced them to use the
platform dependent macros (LINUX, X86 ...) already defined.

I also removed all headers carying _64 or _32 in their name.
There were three of them on ppc. As I learned there is no closed PPC32 port
any more, I just renamed the without the _64 suffix. I found one on x86
(stubRoutines_...hpp). I merged it and used LP64 guards for the
differences. I think this is  acceptable as the files are rather small
and it's the only case.

The adlc generated files all had suffix _64/_32 which I removed.
These are not significant, either, because 32-bit and 64-bit
VM should be built in different directories.

Also, in the pre-discussion to this change we found that the
mutex platform files are empty. Thus I removed them.

Please review this webrev. I please need a sponsor:
To view the core of this change, look at CompileJvm.gmk and utilities/macros.hpp.

I include hs-comp due to the changes in CompileAdlc.gmk.

I compiled the webrev on the following platforms:
linux_x86_64, linux_ppc64, linux_ppc64le, linux_zero(x86_64)

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160714/3da92bcf/attachment.html>

More information about the hotspot-compiler-dev mailing list