Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.cc ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 save_fp, 202 save_fp,
203 remembered_set_action, 203 remembered_set_action,
204 OMIT_SMI_CHECK, 204 OMIT_SMI_CHECK,
205 pointers_to_here_check_for_value); 205 pointers_to_here_check_for_value);
206 206
207 bind(&done); 207 bind(&done);
208 208
209 // Clobber clobbered input registers when running with the debug-code flag 209 // Clobber clobbered input registers when running with the debug-code flag
210 // turned on to provoke errors. 210 // turned on to provoke errors.
211 if (emit_debug_code()) { 211 if (emit_debug_code()) {
212 li(value, Operand(BitCast<int32_t>(kZapValue + 4))); 212 li(value, Operand(bit_cast<int32_t>(kZapValue + 4)));
213 li(dst, Operand(BitCast<int32_t>(kZapValue + 8))); 213 li(dst, Operand(bit_cast<int32_t>(kZapValue + 8)));
214 } 214 }
215 } 215 }
216 216
217 217
218 // Will clobber 4 registers: object, map, dst, ip. The 218 // Will clobber 4 registers: object, map, dst, ip. The
219 // register 'object' contains a heap object pointer. 219 // register 'object' contains a heap object pointer.
220 void MacroAssembler::RecordWriteForMap(Register object, 220 void MacroAssembler::RecordWriteForMap(Register object,
221 Register map, 221 Register map,
222 Register dst, 222 Register dst,
223 RAStatus ra_status, 223 RAStatus ra_status,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 bind(&done); 278 bind(&done);
279 279
280 // Count number of write barriers in generated code. 280 // Count number of write barriers in generated code.
281 isolate()->counters()->write_barriers_static()->Increment(); 281 isolate()->counters()->write_barriers_static()->Increment();
282 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, at, dst); 282 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, at, dst);
283 283
284 // Clobber clobbered registers when running with the debug-code flag 284 // Clobber clobbered registers when running with the debug-code flag
285 // turned on to provoke errors. 285 // turned on to provoke errors.
286 if (emit_debug_code()) { 286 if (emit_debug_code()) {
287 li(dst, Operand(BitCast<int32_t>(kZapValue + 12))); 287 li(dst, Operand(bit_cast<int32_t>(kZapValue + 12)));
288 li(map, Operand(BitCast<int32_t>(kZapValue + 16))); 288 li(map, Operand(bit_cast<int32_t>(kZapValue + 16)));
289 } 289 }
290 } 290 }
291 291
292 292
293 // Will clobber 4 registers: object, address, scratch, ip. The 293 // Will clobber 4 registers: object, address, scratch, ip. The
294 // register 'object' contains a heap object pointer. The heap object 294 // register 'object' contains a heap object pointer. The heap object
295 // tag is shifted away. 295 // tag is shifted away.
296 void MacroAssembler::RecordWrite( 296 void MacroAssembler::RecordWrite(
297 Register object, 297 Register object,
298 Register address, 298 Register address,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 bind(&done); 352 bind(&done);
353 353
354 // Count number of write barriers in generated code. 354 // Count number of write barriers in generated code.
355 isolate()->counters()->write_barriers_static()->Increment(); 355 isolate()->counters()->write_barriers_static()->Increment();
356 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, at, 356 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, at,
357 value); 357 value);
358 358
359 // Clobber clobbered registers when running with the debug-code flag 359 // Clobber clobbered registers when running with the debug-code flag
360 // turned on to provoke errors. 360 // turned on to provoke errors.
361 if (emit_debug_code()) { 361 if (emit_debug_code()) {
362 li(address, Operand(BitCast<int32_t>(kZapValue + 12))); 362 li(address, Operand(bit_cast<int32_t>(kZapValue + 12)));
363 li(value, Operand(BitCast<int32_t>(kZapValue + 16))); 363 li(value, Operand(bit_cast<int32_t>(kZapValue + 16)));
364 } 364 }
365 } 365 }
366 366
367 367
368 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. 368 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
369 Register address, 369 Register address,
370 Register scratch, 370 Register scratch,
371 SaveFPRegsMode fp_mode, 371 SaveFPRegsMode fp_mode,
372 RememberedSetFinalAction and_then) { 372 RememberedSetFinalAction and_then) {
373 Label done; 373 Label done;
(...skipping 5746 matching lines...) Expand 10 before | Expand all | Expand 10 after
6120 } 6120 }
6121 if (mag.shift > 0) sra(result, result, mag.shift); 6121 if (mag.shift > 0) sra(result, result, mag.shift);
6122 srl(at, dividend, 31); 6122 srl(at, dividend, 31);
6123 Addu(result, result, Operand(at)); 6123 Addu(result, result, Operand(at));
6124 } 6124 }
6125 6125
6126 6126
6127 } } // namespace v8::internal 6127 } } // namespace v8::internal
6128 6128
6129 #endif // V8_TARGET_ARCH_MIPS 6129 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698