< prev index next >

src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp

Print this page
*** 2173,10 ***
--- 2173,24 ---
    generate_and_dispatch(t);
  }
  
  //-----------------------------------------------------------------------------
  
+ void TemplateInterpreterGenerator::count_bytecode() {
+   int offs = __ load_const_optimized(R11_scratch1, (address) &BytecodeCounter::_counter_value, R12_scratch2, true);
+   __ lwz(R12_scratch2, offs, R11_scratch1);
+   __ addi(R12_scratch2, R12_scratch2, 1);
+   __ stw(R12_scratch2, offs, R11_scratch1);
+ }
+ 
+ void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
+   int offs = __ load_const_optimized(R11_scratch1, (address) &BytecodeHistogram::_counters[t->bytecode()], R12_scratch2, true);
+   __ lwz(R12_scratch2, offs, R11_scratch1);
+   __ addi(R12_scratch2, R12_scratch2, 1);
+   __ stw(R12_scratch2, offs, R11_scratch1);
+ }
+ 
  // Non-product code
  #ifndef PRODUCT
  address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
    //__ flush_bundle();
    address entry = __ pc();

*** 2260,24 ***
    __ blr();
    BLOCK_COMMENT("} trace_code");
    return entry;
  }
  
- void TemplateInterpreterGenerator::count_bytecode() {
-   int offs = __ load_const_optimized(R11_scratch1, (address) &BytecodeCounter::_counter_value, R12_scratch2, true);
-   __ lwz(R12_scratch2, offs, R11_scratch1);
-   __ addi(R12_scratch2, R12_scratch2, 1);
-   __ stw(R12_scratch2, offs, R11_scratch1);
- }
- 
- void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
-   int offs = __ load_const_optimized(R11_scratch1, (address) &BytecodeHistogram::_counters[t->bytecode()], R12_scratch2, true);
-   __ lwz(R12_scratch2, offs, R11_scratch1);
-   __ addi(R12_scratch2, R12_scratch2, 1);
-   __ stw(R12_scratch2, offs, R11_scratch1);
- }
- 
  void TemplateInterpreterGenerator::histogram_bytecode_pair(Template* t) {
    const Register addr = R11_scratch1,
                   tmp  = R12_scratch2;
    // Get index, shift out old bytecode, bring in new bytecode, and store it.
    // _index = (_index >> log2_number_of_codes) |
--- 2274,10 ---
< prev index next >