src/cpu/x86/vm/icBuffer_x86.cpp

changeset 4037
da91efe96a93
parent 2314
f95d63e2154a
child 4318
cd3d6a6b95d9
     1.1 --- a/src/cpu/x86/vm/icBuffer_x86.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/cpu/x86/vm/icBuffer_x86.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -44,16 +44,16 @@
    1.11  
    1.12  
    1.13  
    1.14 -void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin, oop cached_oop, address entry_point) {
    1.15 +void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin, void* cached_value, address entry_point) {
    1.16    ResourceMark rm;
    1.17    CodeBuffer      code(code_begin, ic_stub_code_size());
    1.18    MacroAssembler* masm            = new MacroAssembler(&code);
    1.19 -  // note: even though the code contains an embedded oop, we do not need reloc info
    1.20 +  // note: even though the code contains an embedded value, we do not need reloc info
    1.21    // because
    1.22 -  // (1) the oop is old (i.e., doesn't matter for scavenges)
    1.23 +  // (1) the value is old (i.e., doesn't matter for scavenges)
    1.24    // (2) these ICStubs are removed *before* a GC happens, so the roots disappear
    1.25 -  assert(cached_oop == NULL || cached_oop->is_perm(), "must be perm oop");
    1.26 -  masm->lea(rax, OopAddress((address) cached_oop));
    1.27 +  // assert(cached_value == NULL || cached_oop->is_perm(), "must be perm oop");
    1.28 +  masm->lea(rax, AddressLiteral((address) cached_value, relocInfo::metadata_type));
    1.29    masm->jump(ExternalAddress(entry_point));
    1.30  }
    1.31  
    1.32 @@ -65,10 +65,11 @@
    1.33  }
    1.34  
    1.35  
    1.36 -oop InlineCacheBuffer::ic_buffer_cached_oop(address code_begin) {
    1.37 +void* InlineCacheBuffer::ic_buffer_cached_value(address code_begin) {
    1.38    // creation also verifies the object
    1.39    NativeMovConstReg* move = nativeMovConstReg_at(code_begin);
    1.40    // Verifies the jump
    1.41    NativeJump*        jump = nativeJump_at(move->next_instruction_address());
    1.42 -  return (oop)move->data();
    1.43 +  void* o = (void*)move->data();
    1.44 +  return o;
    1.45  }

mercurial