hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
changeset 1066 717c3345024f
parent 670 ddf3e9583f2f
child 2867 69187054225f
equal deleted inserted replaced
1065:dbeb68f8a0ee 1066:717c3345024f
    24 
    24 
    25 #include "incls/_precompiled.incl"
    25 #include "incls/_precompiled.incl"
    26 #include "incls/_c1_MacroAssembler_x86.cpp.incl"
    26 #include "incls/_c1_MacroAssembler_x86.cpp.incl"
    27 
    27 
    28 int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
    28 int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
    29   const int aligned_mask = 3;
    29   const int aligned_mask = BytesPerWord -1;
    30   const int hdr_offset = oopDesc::mark_offset_in_bytes();
    30   const int hdr_offset = oopDesc::mark_offset_in_bytes();
    31   assert(hdr == rax, "hdr must be rax, for the cmpxchg instruction");
    31   assert(hdr == rax, "hdr must be rax, for the cmpxchg instruction");
    32   assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
    32   assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
    33   assert(BytesPerWord == 4, "adjust aligned_mask and code");
       
    34   Label done;
    33   Label done;
    35   int null_check_offset = -1;
    34   int null_check_offset = -1;
    36 
    35 
    37   verify_oop(obj);
    36   verify_oop(obj);
    38 
    37 
    39   // save object being locked into the BasicObjectLock
    38   // save object being locked into the BasicObjectLock
    40   movl(Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()), obj);
    39   movptr(Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()), obj);
    41 
    40 
    42   if (UseBiasedLocking) {
    41   if (UseBiasedLocking) {
    43     assert(scratch != noreg, "should have scratch register at this point");
    42     assert(scratch != noreg, "should have scratch register at this point");
    44     null_check_offset = biased_locking_enter(disp_hdr, obj, hdr, scratch, false, done, &slow_case);
    43     null_check_offset = biased_locking_enter(disp_hdr, obj, hdr, scratch, false, done, &slow_case);
    45   } else {
    44   } else {
    46     null_check_offset = offset();
    45     null_check_offset = offset();
    47   }
    46   }
    48 
    47 
    49   // Load object header
    48   // Load object header
    50   movl(hdr, Address(obj, hdr_offset));
    49   movptr(hdr, Address(obj, hdr_offset));
    51   // and mark it as unlocked
    50   // and mark it as unlocked
    52   orl(hdr, markOopDesc::unlocked_value);
    51   orptr(hdr, markOopDesc::unlocked_value);
    53   // save unlocked object header into the displaced header location on the stack
    52   // save unlocked object header into the displaced header location on the stack
    54   movl(Address(disp_hdr, 0), hdr);
    53   movptr(Address(disp_hdr, 0), hdr);
    55   // test if object header is still the same (i.e. unlocked), and if so, store the
    54   // test if object header is still the same (i.e. unlocked), and if so, store the
    56   // displaced header address in the object header - if it is not the same, get the
    55   // displaced header address in the object header - if it is not the same, get the
    57   // object header instead
    56   // object header instead
    58   if (os::is_MP()) MacroAssembler::lock(); // must be immediately before cmpxchg!
    57   if (os::is_MP()) MacroAssembler::lock(); // must be immediately before cmpxchg!
    59   cmpxchg(disp_hdr, Address(obj, hdr_offset));
    58   cmpxchgptr(disp_hdr, Address(obj, hdr_offset));
    60   // if the object header was the same, we're done
    59   // if the object header was the same, we're done
    61   if (PrintBiasedLockingStatistics) {
    60   if (PrintBiasedLockingStatistics) {
    62     cond_inc32(Assembler::equal,
    61     cond_inc32(Assembler::equal,
    63                ExternalAddress((address)BiasedLocking::fast_path_entry_count_addr()));
    62                ExternalAddress((address)BiasedLocking::fast_path_entry_count_addr()));
    64   }
    63   }
    74   //
    73   //
    75   // (hdr - rsp) & (aligned_mask - page_size)
    74   // (hdr - rsp) & (aligned_mask - page_size)
    76   //
    75   //
    77   // assuming both the stack pointer and page_size have their least
    76   // assuming both the stack pointer and page_size have their least
    78   // significant 2 bits cleared and page_size is a power of 2
    77   // significant 2 bits cleared and page_size is a power of 2
    79   subl(hdr, rsp);
    78   subptr(hdr, rsp);
    80   andl(hdr, aligned_mask - os::vm_page_size());
    79   andptr(hdr, aligned_mask - os::vm_page_size());
    81   // for recursive locking, the result is zero => save it in the displaced header
    80   // for recursive locking, the result is zero => save it in the displaced header
    82   // location (NULL in the displaced hdr location indicates recursive locking)
    81   // location (NULL in the displaced hdr location indicates recursive locking)
    83   movl(Address(disp_hdr, 0), hdr);
    82   movptr(Address(disp_hdr, 0), hdr);
    84   // otherwise we don't care about the result and handle locking via runtime call
    83   // otherwise we don't care about the result and handle locking via runtime call
    85   jcc(Assembler::notZero, slow_case);
    84   jcc(Assembler::notZero, slow_case);
    86   // done
    85   // done
    87   bind(done);
    86   bind(done);
    88   return null_check_offset;
    87   return null_check_offset;
    89 }
    88 }
    90 
    89 
    91 
    90 
    92 void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
    91 void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
    93   const int aligned_mask = 3;
    92   const int aligned_mask = BytesPerWord -1;
    94   const int hdr_offset = oopDesc::mark_offset_in_bytes();
    93   const int hdr_offset = oopDesc::mark_offset_in_bytes();
    95   assert(disp_hdr == rax, "disp_hdr must be rax, for the cmpxchg instruction");
    94   assert(disp_hdr == rax, "disp_hdr must be rax, for the cmpxchg instruction");
    96   assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
    95   assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
    97   assert(BytesPerWord == 4, "adjust aligned_mask and code");
       
    98   Label done;
    96   Label done;
    99 
    97 
   100   if (UseBiasedLocking) {
    98   if (UseBiasedLocking) {
   101     // load object
    99     // load object
   102     movl(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
   100     movptr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
   103     biased_locking_exit(obj, hdr, done);
   101     biased_locking_exit(obj, hdr, done);
   104   }
   102   }
   105 
   103 
   106   // load displaced header
   104   // load displaced header
   107   movl(hdr, Address(disp_hdr, 0));
   105   movptr(hdr, Address(disp_hdr, 0));
   108   // if the loaded hdr is NULL we had recursive locking
   106   // if the loaded hdr is NULL we had recursive locking
   109   testl(hdr, hdr);
   107   testptr(hdr, hdr);
   110   // if we had recursive locking, we are done
   108   // if we had recursive locking, we are done
   111   jcc(Assembler::zero, done);
   109   jcc(Assembler::zero, done);
   112   if (!UseBiasedLocking) {
   110   if (!UseBiasedLocking) {
   113     // load object
   111     // load object
   114     movl(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
   112     movptr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
   115   }
   113   }
   116   verify_oop(obj);
   114   verify_oop(obj);
   117   // test if object header is pointing to the displaced header, and if so, restore
   115   // test if object header is pointing to the displaced header, and if so, restore
   118   // the displaced header in the object - if the object header is not pointing to
   116   // the displaced header in the object - if the object header is not pointing to
   119   // the displaced header, get the object header instead
   117   // the displaced header, get the object header instead
   120   if (os::is_MP()) MacroAssembler::lock(); // must be immediately before cmpxchg!
   118   if (os::is_MP()) MacroAssembler::lock(); // must be immediately before cmpxchg!
   121   cmpxchg(hdr, Address(obj, hdr_offset));
   119   cmpxchgptr(hdr, Address(obj, hdr_offset));
   122   // if the object header was not pointing to the displaced header,
   120   // if the object header was not pointing to the displaced header,
   123   // we do unlocking via runtime call
   121   // we do unlocking via runtime call
   124   jcc(Assembler::notEqual, slow_case);
   122   jcc(Assembler::notEqual, slow_case);
   125   // done
   123   // done
   126   bind(done);
   124   bind(done);
   139 
   137 
   140 void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
   138 void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
   141   assert_different_registers(obj, klass, len);
   139   assert_different_registers(obj, klass, len);
   142   if (UseBiasedLocking && !len->is_valid()) {
   140   if (UseBiasedLocking && !len->is_valid()) {
   143     assert_different_registers(obj, klass, len, t1, t2);
   141     assert_different_registers(obj, klass, len, t1, t2);
   144     movl(t1, Address(klass, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
   142     movptr(t1, Address(klass, Klass::prototype_header_offset_in_bytes() + klassOopDesc::klass_part_offset_in_bytes()));
   145     movl(Address(obj, oopDesc::mark_offset_in_bytes()), t1);
   143     movptr(Address(obj, oopDesc::mark_offset_in_bytes()), t1);
   146   } else {
   144   } else {
   147     movl(Address(obj, oopDesc::mark_offset_in_bytes ()), (int)markOopDesc::prototype());
   145     // This assumes that all prototype bits fit in an int32_t
   148   }
   146     movptr(Address(obj, oopDesc::mark_offset_in_bytes ()), (int32_t)(intptr_t)markOopDesc::prototype());
   149 
   147   }
   150   movl(Address(obj, oopDesc::klass_offset_in_bytes()), klass);
   148 
       
   149   movptr(Address(obj, oopDesc::klass_offset_in_bytes()), klass);
   151   if (len->is_valid()) {
   150   if (len->is_valid()) {
   152     movl(Address(obj, arrayOopDesc::length_offset_in_bytes()), len);
   151     movl(Address(obj, arrayOopDesc::length_offset_in_bytes()), len);
   153   }
   152   }
   154 }
   153 }
   155 
   154 
   158 void C1_MacroAssembler::initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1) {
   157 void C1_MacroAssembler::initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1) {
   159   Label done;
   158   Label done;
   160   assert(obj != len_in_bytes && obj != t1 && t1 != len_in_bytes, "registers must be different");
   159   assert(obj != len_in_bytes && obj != t1 && t1 != len_in_bytes, "registers must be different");
   161   assert((hdr_size_in_bytes & (BytesPerWord - 1)) == 0, "header size is not a multiple of BytesPerWord");
   160   assert((hdr_size_in_bytes & (BytesPerWord - 1)) == 0, "header size is not a multiple of BytesPerWord");
   162   Register index = len_in_bytes;
   161   Register index = len_in_bytes;
   163   subl(index, hdr_size_in_bytes);
   162   // index is positive and ptr sized
       
   163   subptr(index, hdr_size_in_bytes);
   164   jcc(Assembler::zero, done);
   164   jcc(Assembler::zero, done);
   165   // initialize topmost word, divide index by 2, check if odd and test if zero
   165   // initialize topmost word, divide index by 2, check if odd and test if zero
   166   // note: for the remaining code to work, index must be a multiple of BytesPerWord
   166   // note: for the remaining code to work, index must be a multiple of BytesPerWord
   167 #ifdef ASSERT
   167 #ifdef ASSERT
   168   { Label L;
   168   { Label L;
   169     testl(index, BytesPerWord - 1);
   169     testptr(index, BytesPerWord - 1);
   170     jcc(Assembler::zero, L);
   170     jcc(Assembler::zero, L);
   171     stop("index is not a multiple of BytesPerWord");
   171     stop("index is not a multiple of BytesPerWord");
   172     bind(L);
   172     bind(L);
   173   }
   173   }
   174 #endif
   174 #endif
   175   xorl(t1, t1);      // use _zero reg to clear memory (shorter code)
   175   xorptr(t1, t1);    // use _zero reg to clear memory (shorter code)
   176   if (UseIncDec) {
   176   if (UseIncDec) {
   177     shrl(index, 3);  // divide by 8 and set carry flag if bit 2 was set
   177     shrptr(index, 3);  // divide by 8/16 and set carry flag if bit 2 was set
   178   } else {
   178   } else {
   179     shrl(index, 2);  // use 2 instructions to avoid partial flag stall
   179     shrptr(index, 2);  // use 2 instructions to avoid partial flag stall
   180     shrl(index, 1);
   180     shrptr(index, 1);
   181   }
   181   }
       
   182 #ifndef _LP64
   182   // index could have been not a multiple of 8 (i.e., bit 2 was set)
   183   // index could have been not a multiple of 8 (i.e., bit 2 was set)
   183   { Label even;
   184   { Label even;
   184     // note: if index was a multiple of 8, than it cannot
   185     // note: if index was a multiple of 8, than it cannot
   185     //       be 0 now otherwise it must have been 0 before
   186     //       be 0 now otherwise it must have been 0 before
   186     //       => if it is even, we don't need to check for 0 again
   187     //       => if it is even, we don't need to check for 0 again
   187     jcc(Assembler::carryClear, even);
   188     jcc(Assembler::carryClear, even);
   188     // clear topmost word (no jump needed if conditional assignment would work here)
   189     // clear topmost word (no jump needed if conditional assignment would work here)
   189     movl(Address(obj, index, Address::times_8, hdr_size_in_bytes - 0*BytesPerWord), t1);
   190     movptr(Address(obj, index, Address::times_8, hdr_size_in_bytes - 0*BytesPerWord), t1);
   190     // index could be 0 now, need to check again
   191     // index could be 0 now, need to check again
   191     jcc(Assembler::zero, done);
   192     jcc(Assembler::zero, done);
   192     bind(even);
   193     bind(even);
   193   }
   194   }
       
   195 #endif // !_LP64
   194   // initialize remaining object fields: rdx is a multiple of 2 now
   196   // initialize remaining object fields: rdx is a multiple of 2 now
   195   { Label loop;
   197   { Label loop;
   196     bind(loop);
   198     bind(loop);
   197     movl(Address(obj, index, Address::times_8, hdr_size_in_bytes - 1*BytesPerWord), t1);
   199     movptr(Address(obj, index, Address::times_8, hdr_size_in_bytes - 1*BytesPerWord), t1);
   198     movl(Address(obj, index, Address::times_8, hdr_size_in_bytes - 2*BytesPerWord), t1);
   200     NOT_LP64(movptr(Address(obj, index, Address::times_8, hdr_size_in_bytes - 2*BytesPerWord), t1);)
   199     decrement(index);
   201     decrement(index);
   200     jcc(Assembler::notZero, loop);
   202     jcc(Assembler::notZero, loop);
   201   }
   203   }
   202 
   204 
   203   // done
   205   // done
   225   // clear rest of allocated space
   227   // clear rest of allocated space
   226   const Register t1_zero = t1;
   228   const Register t1_zero = t1;
   227   const Register index = t2;
   229   const Register index = t2;
   228   const int threshold = 6 * BytesPerWord;   // approximate break even point for code size (see comments below)
   230   const int threshold = 6 * BytesPerWord;   // approximate break even point for code size (see comments below)
   229   if (var_size_in_bytes != noreg) {
   231   if (var_size_in_bytes != noreg) {
   230     movl(index, var_size_in_bytes);
   232     mov(index, var_size_in_bytes);
   231     initialize_body(obj, index, hdr_size_in_bytes, t1_zero);
   233     initialize_body(obj, index, hdr_size_in_bytes, t1_zero);
   232   } else if (con_size_in_bytes <= threshold) {
   234   } else if (con_size_in_bytes <= threshold) {
   233     // use explicit null stores
   235     // use explicit null stores
   234     // code size = 2 + 3*n bytes (n = number of fields to clear)
   236     // code size = 2 + 3*n bytes (n = number of fields to clear)
   235     xorl(t1_zero, t1_zero); // use t1_zero reg to clear memory (shorter code)
   237     xorptr(t1_zero, t1_zero); // use t1_zero reg to clear memory (shorter code)
   236     for (int i = hdr_size_in_bytes; i < con_size_in_bytes; i += BytesPerWord)
   238     for (int i = hdr_size_in_bytes; i < con_size_in_bytes; i += BytesPerWord)
   237       movl(Address(obj, i), t1_zero);
   239       movptr(Address(obj, i), t1_zero);
   238   } else if (con_size_in_bytes > hdr_size_in_bytes) {
   240   } else if (con_size_in_bytes > hdr_size_in_bytes) {
   239     // use loop to null out the fields
   241     // use loop to null out the fields
   240     // code size = 16 bytes for even n (n = number of fields to clear)
   242     // code size = 16 bytes for even n (n = number of fields to clear)
   241     // initialize last object field first if odd number of fields
   243     // initialize last object field first if odd number of fields
   242     xorl(t1_zero, t1_zero); // use t1_zero reg to clear memory (shorter code)
   244     xorptr(t1_zero, t1_zero); // use t1_zero reg to clear memory (shorter code)
   243     movl(index, (con_size_in_bytes - hdr_size_in_bytes) >> 3);
   245     movptr(index, (con_size_in_bytes - hdr_size_in_bytes) >> 3);
   244     // initialize last object field if constant size is odd
   246     // initialize last object field if constant size is odd
   245     if (((con_size_in_bytes - hdr_size_in_bytes) & 4) != 0)
   247     if (((con_size_in_bytes - hdr_size_in_bytes) & 4) != 0)
   246       movl(Address(obj, con_size_in_bytes - (1*BytesPerWord)), t1_zero);
   248       movptr(Address(obj, con_size_in_bytes - (1*BytesPerWord)), t1_zero);
   247     // initialize remaining object fields: rdx is a multiple of 2
   249     // initialize remaining object fields: rdx is a multiple of 2
   248     { Label loop;
   250     { Label loop;
   249       bind(loop);
   251       bind(loop);
   250       movl(Address(obj, index, Address::times_8,
   252       movptr(Address(obj, index, Address::times_8, hdr_size_in_bytes - (1*BytesPerWord)),
   251         hdr_size_in_bytes - (1*BytesPerWord)), t1_zero);
   253              t1_zero);
   252       movl(Address(obj, index, Address::times_8,
   254       NOT_LP64(movptr(Address(obj, index, Address::times_8, hdr_size_in_bytes - (2*BytesPerWord)),
   253         hdr_size_in_bytes - (2*BytesPerWord)), t1_zero);
   255              t1_zero);)
   254       decrement(index);
   256       decrement(index);
   255       jcc(Assembler::notZero, loop);
   257       jcc(Assembler::notZero, loop);
   256     }
   258     }
   257   }
   259   }
   258 
   260 
   267 void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int header_size, Address::ScaleFactor f, Register klass, Label& slow_case) {
   269 void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1, Register t2, int header_size, Address::ScaleFactor f, Register klass, Label& slow_case) {
   268   assert(obj == rax, "obj must be in rax, for cmpxchg");
   270   assert(obj == rax, "obj must be in rax, for cmpxchg");
   269   assert_different_registers(obj, len, t1, t2, klass);
   271   assert_different_registers(obj, len, t1, t2, klass);
   270 
   272 
   271   // determine alignment mask
   273   // determine alignment mask
   272   assert(BytesPerWord == 4, "must be a multiple of 2 for masking code to work");
   274   assert(!(BytesPerWord & 1), "must be a multiple of 2 for masking code to work");
   273 
   275 
   274   // check for negative or excessive length
   276   // check for negative or excessive length
   275   cmpl(len, max_array_allocation_length);
   277   cmpptr(len, (int32_t)max_array_allocation_length);
   276   jcc(Assembler::above, slow_case);
   278   jcc(Assembler::above, slow_case);
   277 
   279 
   278   const Register arr_size = t2; // okay to be the same
   280   const Register arr_size = t2; // okay to be the same
   279   // align object end
   281   // align object end
   280   movl(arr_size, header_size * BytesPerWord + MinObjAlignmentInBytesMask);
   282   movptr(arr_size, (int32_t)header_size * BytesPerWord + MinObjAlignmentInBytesMask);
   281   leal(arr_size, Address(arr_size, len, f));
   283   lea(arr_size, Address(arr_size, len, f));
   282   andl(arr_size, ~MinObjAlignmentInBytesMask);
   284   andptr(arr_size, ~MinObjAlignmentInBytesMask);
   283 
   285 
   284   try_allocate(obj, arr_size, 0, t1, t2, slow_case);
   286   try_allocate(obj, arr_size, 0, t1, t2, slow_case);
   285 
   287 
   286   initialize_header(obj, klass, len, t1, t2);
   288   initialize_header(obj, klass, len, t1, t2);
   287 
   289 
   303   verify_oop(receiver);
   305   verify_oop(receiver);
   304   // explicit NULL check not needed since load from [klass_offset] causes a trap
   306   // explicit NULL check not needed since load from [klass_offset] causes a trap
   305   // check against inline cache
   307   // check against inline cache
   306   assert(!MacroAssembler::needs_explicit_null_check(oopDesc::klass_offset_in_bytes()), "must add explicit null check");
   308   assert(!MacroAssembler::needs_explicit_null_check(oopDesc::klass_offset_in_bytes()), "must add explicit null check");
   307   int start_offset = offset();
   309   int start_offset = offset();
   308   cmpl(iCache, Address(receiver, oopDesc::klass_offset_in_bytes()));
   310   cmpptr(iCache, Address(receiver, oopDesc::klass_offset_in_bytes()));
   309   // if icache check fails, then jump to runtime routine
   311   // if icache check fails, then jump to runtime routine
   310   // Note: RECEIVER must still contain the receiver!
   312   // Note: RECEIVER must still contain the receiver!
   311   jump_cc(Assembler::notEqual,
   313   jump_cc(Assembler::notEqual,
   312           RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
   314           RuntimeAddress(SharedRuntime::get_ic_miss_stub()));
   313   assert(offset() - start_offset == 9, "check alignment in emit_method_entry");
   315   const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9);
       
   316   assert(offset() - start_offset == ic_cmp_size, "check alignment in emit_method_entry");
   314 }
   317 }
   315 
   318 
   316 
   319 
   317 void C1_MacroAssembler::method_exit(bool restore_frame) {
   320 void C1_MacroAssembler::method_exit(bool restore_frame) {
   318   if (restore_frame) {
   321   if (restore_frame) {
   362 }
   365 }
   363 
   366 
   364 void C1_MacroAssembler::verify_not_null_oop(Register r) {
   367 void C1_MacroAssembler::verify_not_null_oop(Register r) {
   365   if (!VerifyOops) return;
   368   if (!VerifyOops) return;
   366   Label not_null;
   369   Label not_null;
   367   testl(r, r);
   370   testptr(r, r);
   368   jcc(Assembler::notZero, not_null);
   371   jcc(Assembler::notZero, not_null);
   369   stop("non-null oop required");
   372   stop("non-null oop required");
   370   bind(not_null);
   373   bind(not_null);
   371   verify_oop(r);
   374   verify_oop(r);
   372 }
   375 }
   373 
   376 
   374 void C1_MacroAssembler::invalidate_registers(bool inv_rax, bool inv_rbx, bool inv_rcx, bool inv_rdx, bool inv_rsi, bool inv_rdi) {
   377 void C1_MacroAssembler::invalidate_registers(bool inv_rax, bool inv_rbx, bool inv_rcx, bool inv_rdx, bool inv_rsi, bool inv_rdi) {
   375 #ifdef ASSERT
   378 #ifdef ASSERT
   376   if (inv_rax) movl(rax, 0xDEAD);
   379   if (inv_rax) movptr(rax, 0xDEAD);
   377   if (inv_rbx) movl(rbx, 0xDEAD);
   380   if (inv_rbx) movptr(rbx, 0xDEAD);
   378   if (inv_rcx) movl(rcx, 0xDEAD);
   381   if (inv_rcx) movptr(rcx, 0xDEAD);
   379   if (inv_rdx) movl(rdx, 0xDEAD);
   382   if (inv_rdx) movptr(rdx, 0xDEAD);
   380   if (inv_rsi) movl(rsi, 0xDEAD);
   383   if (inv_rsi) movptr(rsi, 0xDEAD);
   381   if (inv_rdi) movl(rdi, 0xDEAD);
   384   if (inv_rdi) movptr(rdi, 0xDEAD);
   382 #endif
   385 #endif
   383 }
   386 }
   384 
   387 
   385 #endif // ifndef PRODUCT
   388 #endif // ifndef PRODUCT