Print this page
rev 6900 : 8048169: Change 8037816 breaks HS build on PPC64 and CPP-Interpreter platforms
Summary: Fix the matching of format string parameter types to the actual argument types for the PPC64 and CPP-Interpreter files in the same way as 8037816 already did it for all the other files
Reviewed-by: stefank, coleenp, dholmes

Split Split Close
Expand all
Collapse all
          --- old/hotspot/src/cpu/ppc/vm/nativeInst_ppc.cpp
          +++ new/hotspot/src/cpu/ppc/vm/nativeInst_ppc.cpp
   1    1  /*
   2      - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3      - * Copyright 2012, 2013 SAP AG. All rights reserved.
        2 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
        3 + * Copyright 2012, 2014 SAP AG. All rights reserved.
   4    4   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5    5   *
   6    6   * This code is free software; you can redistribute it and/or modify it
   7    7   * under the terms of the GNU General Public License version 2 only, as
   8    8   * published by the Free Software Foundation.
   9    9   *
  10   10   * This code is distributed in the hope that it will be useful, but WITHOUT
  11   11   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12   12   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13   13   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 126 lines elided ↑ open up ↑
 140  140    // If the codeBlob is not a nmethod, this is because we get here from the
 141  141    // CodeBlob constructor, which is called within the nmethod constructor.
 142  142    return trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
 143  143  }
 144  144  
 145  145  #ifdef ASSERT
 146  146  void NativeCall::verify() {
 147  147    address addr = addr_at(0);
 148  148  
 149  149    if (!NativeCall::is_call_at(addr)) {
 150      -    tty->print_cr("not a NativeCall at " PTR_FORMAT, addr);
      150 +    tty->print_cr("not a NativeCall at " PTR_FORMAT, p2i(addr));
 151  151      // TODO: PPC port: Disassembler::decode(addr - 20, addr + 20, tty);
 152      -    fatal(err_msg("not a NativeCall at " PTR_FORMAT, addr));
      152 +    fatal(err_msg("not a NativeCall at " PTR_FORMAT, p2i(addr)));
 153  153    }
 154  154  }
 155  155  #endif // ASSERT
 156  156  
 157  157  #ifdef ASSERT
 158  158  void NativeFarCall::verify() {
 159  159    address addr = addr_at(0);
 160  160  
 161  161    NativeInstruction::verify();
 162  162    if (!NativeFarCall::is_far_call_at(addr)) {
 163      -    tty->print_cr("not a NativeFarCall at " PTR_FORMAT, addr);
      163 +    tty->print_cr("not a NativeFarCall at " PTR_FORMAT, p2i(addr));
 164  164      // TODO: PPC port: Disassembler::decode(addr, 20, 20, tty);
 165      -    fatal(err_msg("not a NativeFarCall at " PTR_FORMAT, addr));
      165 +    fatal(err_msg("not a NativeFarCall at " PTR_FORMAT, p2i(addr)));
 166  166    }
 167  167  }
 168  168  #endif // ASSERT
 169  169  
 170  170  address NativeMovConstReg::next_instruction_address() const {
 171  171  #ifdef ASSERT
 172  172    CodeBlob* nm = CodeCache::find_blob(instruction_address());
 173  173    assert(!MacroAssembler::is_set_narrow_oop(addr_at(0), nm->content_begin()), "Should not patch narrow oop here");
 174  174  #endif
 175  175  
↓ open down ↓ 123 lines elided ↑ open up ↑
 299  299  // want this when assertions are enabled.
 300  300  #ifdef ASSERT
 301  301  void NativeMovConstReg::verify() {
 302  302    address   addr = addr_at(0);
 303  303    if (! MacroAssembler::is_load_const_at(addr) &&
 304  304        ! MacroAssembler::is_load_const_from_method_toc_at(addr)) {
 305  305      CodeBlob* cb = CodeCache::find_blob_unsafe(addr);   // find_nmethod() asserts if nmethod is zombie.
 306  306      if (! (cb != NULL && MacroAssembler::is_calculate_address_from_global_toc_at(addr, cb->content_begin())) &&
 307  307          ! (cb != NULL && MacroAssembler::is_set_narrow_oop(addr, cb->content_begin())) &&
 308  308          ! MacroAssembler::is_bl(*((int*) addr))) {
 309      -      tty->print_cr("not a NativeMovConstReg at " PTR_FORMAT, addr);
      309 +      tty->print_cr("not a NativeMovConstReg at " PTR_FORMAT, p2i(addr));
 310  310        // TODO: PPC port: Disassembler::decode(addr, 20, 20, tty);
 311      -      fatal(err_msg("not a NativeMovConstReg at " PTR_FORMAT, addr));
      311 +      fatal(err_msg("not a NativeMovConstReg at " PTR_FORMAT, p2i(addr)));
 312  312      }
 313  313    }
 314  314  }
 315  315  #endif // ASSERT
 316  316  
 317  317  void NativeJump::patch_verified_entry(address entry, address verified_entry, address dest) {
 318  318    ResourceMark rm;
 319  319    int code_size = 1 * BytesPerInstWord;
 320  320    CodeBuffer cb(verified_entry, code_size + 1);
 321  321    MacroAssembler* a = new MacroAssembler(&cb);
↓ open down ↓ 15 lines elided ↑ open up ↑
 337  337    }
 338  338    ICache::ppc64_flush_icache_bytes(verified_entry, code_size);
 339  339  }
 340  340  
 341  341  #ifdef ASSERT
 342  342  void NativeJump::verify() {
 343  343    address addr = addr_at(0);
 344  344  
 345  345    NativeInstruction::verify();
 346  346    if (!NativeJump::is_jump_at(addr)) {
 347      -    tty->print_cr("not a NativeJump at " PTR_FORMAT, addr);
      347 +    tty->print_cr("not a NativeJump at " PTR_FORMAT, p2i(addr));
 348  348      // TODO: PPC port: Disassembler::decode(addr, 20, 20, tty);
 349      -    fatal(err_msg("not a NativeJump at " PTR_FORMAT, addr));
      349 +    fatal(err_msg("not a NativeJump at " PTR_FORMAT, p2i(addr)));
 350  350    }
 351  351  }
 352  352  #endif // ASSERT
 353  353  
 354  354  //-------------------------------------------------------------------
 355  355  
 356  356  // Call trampoline stubs.
 357  357  //
 358  358  // Layout and instructions of a call trampoline stub:
 359  359  //    0:  load the TOC (part 1)
↓ open down ↓ 32 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX