Opened 13 years ago

Closed 13 years ago

#138 closed enhancement (fixed)

Update OpenJDK to B24

Reported by: rbri Owned by:
Priority: major Milestone: GA2
Component: general Version: 1.6.0-b22 GA
Severity: medium Keywords:
Cc:

Description

OpenJDK6 B23 is out with many changes for the Hotspot VM; maybe we can update.
see: http://blogs.oracle.com/kto/entry/openjdk_6_b23_source_bundle

Change History (10)

comment:2 by dmik, 13 years ago

JFYI, the vendor merge of b24 is done. Now solving the build issues on the trunk and after that I will commit. There are some changes in make process that require attention.

comment:3 by dmik, 13 years ago

I've corrected the make files and most components build now.

The one that doesn't is hotspot: there were some significant changes in how the platform-dependent stuff is defined so I have to fix those places and adopt them to OS/2.

comment:4 by dmik, 13 years ago

Sorted out platform issues and now got a new problem. For some strange reason, gcc generates wrong assembly for one of the inline functions using inline asm(): this assembly incorrectly spelss EDI as %dil. Investigating.

comment:5 by dmik, 13 years ago

First, %dil is the DIL register available in x86-64 (AMD64) mode only. It's a lower byte part of the EDI register (similar to AL for EAX). GCC tries to take the lower byte of the register because the asm instruction is XCHGB which requires a 8-bit (byte) operand. Since the operand constraint ("r") says that GCC may use any general purpose register (including EDI), it selects EDI and then takes its lower byte (DIL). However, since we compile in 32-bit (IA-32) mode on OS/2, the assembler complains because DIL is not available in this mode.

There is a haired GCC bug regarding this topic (with many duplicates, the latest one dated 2011), http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153. It is resolved as INVALID because they think that the responsibility is on the source code that specifies an invalid constrain. While this is arguable (GCC knows that we are in 32-bit mode where DIL doesn't exist and could smartly downgrade the constraint), it isn't going to be changed.

So we have to fix the source and use the proper constraint ("=q") that doesn't let GCC to select EDI at all. This is what I did in r316.

Note that this could build before because given a slightly different source in the previous builds of Java, GCC didn't select EDI for this operation at all (since one of EAX, EBX, ECX or EDX seemed to be available).

I disagree on that since GCC has full knowledge about ththat it must not use DIL and it could

Version 0, edited 13 years ago by dmik (next)

comment:6 by dmik, 13 years ago

Note for tomorrow: add dependency support to hotspot makefiles tomorrow. After changing the make process, the dependencies have gone and we need to steal the code generating dependency rules from the Linux makefiles.

comment:7 by dmik, 13 years ago

Finally, made the new version of hotspot (jvm.dll) built (required some porting of the new code).

They have also added some new launcher that needs to be ported too.

comment:8 by dmik, 13 years ago

Dependencies also done.

comment:9 by dmik, 13 years ago

Priority: minormajor
Summary: OpenJDK B23 pdateUpdate OpenJDK to B24

The JDK part (and the rest of Java) is also built (I had to fix a whole lot of warnings and a few build errors).

The next task is to perform a clean rebuild and do some basic testing to see if b24 works.

comment:10 by dmik, 13 years ago

Resolution: fixed
Status: newclosed

The remaining warnings are fixed and after fixing the DLL init bug in r335 (which is a r332 regression and that's why it didn't show up in previous Javas), it seems to work now. At least, I tried a few console applications and a few GUI ones (including SmartSVN).

So, the update task is done. Any further regressions, if any, should be reported as separate problems.

Note: See TracTickets for help on using tickets.