RFR: 8170106: AArch64: Multiple JVMCI issues

Roland Schatz roland.schatz at oracle.com
Mon Nov 21 16:29:35 UTC 2016


Hi,

> @@ -110,10 +110,11 @@
>        * @param encoding the target machine encoding for the register
>        * @param name the mnemonic name for the register
>        * @param registerCategory the register category
>        */
>       public Register(int number, int encoding, String name, RegisterCategory registerCategory) {
> + assert number < 64;
>           this.number = number;
>           this.name = name;
>           this.registerCategory = registerCategory;
>           this.encoding = encoding;
>       }
Looks like debug leftover. This is in plattform independent code, I 
don't think we should restrict the number of registers allowed for a 
single platform.


>   void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS) {
>     address pc = _instructions->start() + pc_offset;
>     Handle obj = HotSpotObjectConstantImpl::object(constant);
>     jobject value = JNIHandles::make_local(obj());
> - if (HotSpotObjectConstantImpl::compressed(constant)) {
> - int oop_index = _oop_recorder->find_index(value);
> - RelocationHolder rspec = oop_Relocation::spec(oop_index);
> - _instructions->relocate(pc, rspec, 1);
> - Unimplemented();
> - } else {
> - NativeMovConstReg* move = nativeMovConstReg_at(pc);
> - move->set_data((intptr_t) value);
> + MacroAssembler::patch_oop(pc, (address)obj());
>       int oop_index = _oop_recorder->find_index(value);
>       RelocationHolder rspec = oop_Relocation::spec(oop_index);
>       _instructions->relocate(pc, rspec);
> - }
>   }
This is now ignoring the `HotSpotObjectConstantImpl::compressed` field.

Looks like the `MacroAssembler::patch_oop` function does the correct 
thing based on what instruction `pc` points to. I think we should put an 
assertion in here that checks whether the flag is correct. I guess in a 
product build it's ok to swallow this kind of error, but in a fastdebug 
build I think we should fail if the compiler produces mismatching 
instructions and data patches. It makes debugging the compiler a lot 
easier...


- Roland


On 11/21/2016 04:54 PM, Doug Simon wrote:
> (including hotspot-compiler-dev)
>
>> On 21 Nov 2016, at 16:22, Andrew Haley <aph at redhat.com> wrote:
>>
>> JVMCI nearly works, but there are multiple minor bugs which make it
>> non-functional.  It's not possible to separate these into multiple
>> issues, so this is a composite patch.
>>
>> The handling of some relocs is wrong.
>> Narrow klasses and OOPs have only partial support, returning Unimplemented()
>> Register numbering for float registers is wrong
>> Scratch registers r8 and r9 aren't marked as non-allocatable.
>>
>> http://cr.openjdk.java.net/~aph/8170106
>>
>> Andrew.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20161121/f831facf/attachment.html>


More information about the hotspot-compiler-dev mailing list