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

Side by Side Diff: src/ia32/macro-assembler-ia32.h

Issue 7860035: Merge bleeding edge up to 9192 into the GC branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 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/ia32/lithium-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 void ClampUint8(Register reg); 363 void ClampUint8(Register reg);
364 364
365 void ClampDoubleToUint8(XMMRegister input_reg, 365 void ClampDoubleToUint8(XMMRegister input_reg,
366 XMMRegister scratch_reg, 366 XMMRegister scratch_reg,
367 Register result_reg); 367 Register result_reg);
368 368
369 369
370 // Smi tagging support. 370 // Smi tagging support.
371 void SmiTag(Register reg) { 371 void SmiTag(Register reg) {
372 ASSERT(kSmiTag == 0); 372 STATIC_ASSERT(kSmiTag == 0);
373 ASSERT(kSmiTagSize == 1); 373 STATIC_ASSERT(kSmiTagSize == 1);
374 add(reg, Operand(reg)); 374 add(reg, Operand(reg));
375 } 375 }
376 void SmiUntag(Register reg) { 376 void SmiUntag(Register reg) {
377 sar(reg, kSmiTagSize); 377 sar(reg, kSmiTagSize);
378 } 378 }
379 379
380 // Modifies the register even if it does not contain a Smi! 380 // Modifies the register even if it does not contain a Smi!
381 void SmiUntag(Register reg, Label* is_smi) { 381 void SmiUntag(Register reg, Label* is_smi) {
382 ASSERT(kSmiTagSize == 1); 382 STATIC_ASSERT(kSmiTagSize == 1);
383 sar(reg, kSmiTagSize); 383 sar(reg, kSmiTagSize);
384 ASSERT(kSmiTag == 0); 384 STATIC_ASSERT(kSmiTag == 0);
385 j(not_carry, is_smi); 385 j(not_carry, is_smi);
386 } 386 }
387 387
388 // Jump the register contains a smi. 388 // Jump the register contains a smi.
389 inline void JumpIfSmi(Register value, 389 inline void JumpIfSmi(Register value,
390 Label* smi_label, 390 Label* smi_label,
391 Label::Distance distance = Label::kFar) { 391 Label::Distance distance = Label::kFar) {
392 test(value, Immediate(kSmiTagMask)); 392 test(value, Immediate(kSmiTagMask));
393 j(zero, smi_label, distance); 393 j(zero, smi_label, distance);
394 } 394 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 Register scratch3, 524 Register scratch3,
525 Label* gc_required); 525 Label* gc_required);
526 void AllocateAsciiString(Register result, 526 void AllocateAsciiString(Register result,
527 int length, 527 int length,
528 Register scratch1, 528 Register scratch1,
529 Register scratch2, 529 Register scratch2,
530 Label* gc_required); 530 Label* gc_required);
531 531
532 // Allocate a raw cons string object. Only the map field of the result is 532 // Allocate a raw cons string object. Only the map field of the result is
533 // initialized. 533 // initialized.
534 void AllocateConsString(Register result, 534 void AllocateTwoByteConsString(Register result,
535 Register scratch1, 535 Register scratch1,
536 Register scratch2, 536 Register scratch2,
537 Label* gc_required); 537 Label* gc_required);
538 void AllocateAsciiConsString(Register result, 538 void AllocateAsciiConsString(Register result,
539 Register scratch1, 539 Register scratch1,
540 Register scratch2, 540 Register scratch2,
541 Label* gc_required); 541 Label* gc_required);
542 542
543 // Allocate a raw sliced string object. Only the map field of the result is
544 // initialized.
545 void AllocateTwoByteSlicedString(Register result,
546 Register scratch1,
547 Register scratch2,
548 Label* gc_required);
549 void AllocateAsciiSlicedString(Register result,
550 Register scratch1,
551 Register scratch2,
552 Label* gc_required);
553
543 // Copy memory, byte-by-byte, from source to destination. Not optimized for 554 // Copy memory, byte-by-byte, from source to destination. Not optimized for
544 // long or aligned copies. 555 // long or aligned copies.
545 // The contents of index and scratch are destroyed. 556 // The contents of index and scratch are destroyed.
546 void CopyBytes(Register source, 557 void CopyBytes(Register source,
547 Register destination, 558 Register destination,
548 Register length, 559 Register length,
549 Register scratch); 560 Register scratch);
550 561
551 // --------------------------------------------------------------------------- 562 // ---------------------------------------------------------------------------
552 // Support functions. 563 // Support functions.
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } \ 918 } \
908 masm-> 919 masm->
909 #else 920 #else
910 #define ACCESS_MASM(masm) masm-> 921 #define ACCESS_MASM(masm) masm->
911 #endif 922 #endif
912 923
913 924
914 } } // namespace v8::internal 925 } } // namespace v8::internal
915 926
916 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 927 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698