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

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

Issue 6606006: [Isolates] Merge 6500:6700 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 // Modifies the register even if it does not contain a Smi! 253 // Modifies the register even if it does not contain a Smi!
254 void SmiUntag(Register reg, Label* is_smi) { 254 void SmiUntag(Register reg, Label* is_smi) {
255 ASSERT(kSmiTagSize == 1); 255 ASSERT(kSmiTagSize == 1);
256 sar(reg, kSmiTagSize); 256 sar(reg, kSmiTagSize);
257 ASSERT(kSmiTag == 0); 257 ASSERT(kSmiTag == 0);
258 j(not_carry, is_smi); 258 j(not_carry, is_smi);
259 } 259 }
260 260
261 // Jump the register contains a smi.
262 inline void JumpIfSmi(Register value, Label* smi_label) {
263 test(value, Immediate(kSmiTagMask));
264 j(zero, smi_label, not_taken);
265 }
266 // Jump if register contain a non-smi.
267 inline void JumpIfNotSmi(Register value, Label* not_smi_label) {
268 test(value, Immediate(kSmiTagMask));
269 j(not_zero, not_smi_label, not_taken);
270 }
271
261 // Assumes input is a heap object. 272 // Assumes input is a heap object.
262 void JumpIfNotNumber(Register reg, TypeInfo info, Label* on_not_number); 273 void JumpIfNotNumber(Register reg, TypeInfo info, Label* on_not_number);
263 274
264 // Assumes input is a heap number. Jumps on things out of range. Also jumps 275 // Assumes input is a heap number. Jumps on things out of range. Also jumps
265 // on the min negative int32. Ignores frational parts. 276 // on the min negative int32. Ignores frational parts.
266 void ConvertToInt32(Register dst, 277 void ConvertToInt32(Register dst,
267 Register src, // Can be the same as dst. 278 Register src, // Can be the same as dst.
268 Register scratch, // Can be no_reg or dst, but not src. 279 Register scratch, // Can be no_reg or dst, but not src.
269 TypeInfo info, 280 TypeInfo info,
270 Label* on_not_int32); 281 Label* on_not_int32);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 void JumpToExternalReference(const ExternalReference& ext); 543 void JumpToExternalReference(const ExternalReference& ext);
533 544
534 MaybeObject* TryJumpToExternalReference(const ExternalReference& ext); 545 MaybeObject* TryJumpToExternalReference(const ExternalReference& ext);
535 546
536 547
537 // --------------------------------------------------------------------------- 548 // ---------------------------------------------------------------------------
538 // Utilities 549 // Utilities
539 550
540 void Ret(); 551 void Ret();
541 552
553 // Return and drop arguments from stack, where the number of arguments
554 // may be bigger than 2^16 - 1. Requires a scratch register.
555 void Ret(int bytes_dropped, Register scratch);
556
542 // Emit code to discard a non-negative number of pointer-sized elements 557 // Emit code to discard a non-negative number of pointer-sized elements
543 // from the stack, clobbering only the esp register. 558 // from the stack, clobbering only the esp register.
544 void Drop(int element_count); 559 void Drop(int element_count);
545 560
546 void Call(Label* target) { call(target); } 561 void Call(Label* target) { call(target); }
547 562
548 // Emit call to the code we are currently generating. 563 // Emit call to the code we are currently generating.
549 void CallSelf() { 564 void CallSelf() {
550 Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location())); 565 Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location()));
551 call(self, RelocInfo::CODE_TARGET); 566 call(self, RelocInfo::CODE_TARGET);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } \ 771 } \
757 masm-> 772 masm->
758 #else 773 #else
759 #define ACCESS_MASM(masm) masm-> 774 #define ACCESS_MASM(masm) masm->
760 #endif 775 #endif
761 776
762 777
763 } } // namespace v8::internal 778 } } // namespace v8::internal
764 779
765 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 780 #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