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

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

Issue 6577036: [Isolates] Merge from bleeding_edge to isolates, revisions 6100-6300. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ 28 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_
29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ 29 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_
30 30
31 #include "assembler.h" 31 #include "assembler.h"
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 // Forward declaration.
37 class PostCallGenerator;
38
36 // ---------------------------------------------------------------------------- 39 // ----------------------------------------------------------------------------
37 // Static helper functions 40 // Static helper functions
38 41
39 // Generate a MemOperand for loading a field from an object. 42 // Generate a MemOperand for loading a field from an object.
40 static inline MemOperand FieldMemOperand(Register object, int offset) { 43 static inline MemOperand FieldMemOperand(Register object, int offset) {
41 return MemOperand(object, offset - kHeapObjectTag); 44 return MemOperand(object, offset - kHeapObjectTag);
42 } 45 }
43 46
44 47
45 // Give alias names to registers 48 // Give alias names to registers
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 Register dst2, 239 Register dst2,
237 const MemOperand& src, 240 const MemOperand& src,
238 Condition cond = al); 241 Condition cond = al);
239 242
240 // Store two consecutive registers to two consecutive memory locations. 243 // Store two consecutive registers to two consecutive memory locations.
241 void Strd(Register src1, 244 void Strd(Register src1,
242 Register src2, 245 Register src2,
243 const MemOperand& dst, 246 const MemOperand& dst,
244 Condition cond = al); 247 Condition cond = al);
245 248
249 // Clear specified FPSCR bits.
250 void ClearFPSCRBits(const uint32_t bits_to_clear,
251 const Register scratch,
252 const Condition cond = al);
253
254 // Compare double values and move the result to the normal condition flags.
255 void VFPCompareAndSetFlags(const DwVfpRegister src1,
256 const DwVfpRegister src2,
257 const Condition cond = al);
258 void VFPCompareAndSetFlags(const DwVfpRegister src1,
259 const double src2,
260 const Condition cond = al);
261
262 // Compare double values and then load the fpscr flags to a register.
263 void VFPCompareAndLoadFlags(const DwVfpRegister src1,
264 const DwVfpRegister src2,
265 const Register fpscr_flags,
266 const Condition cond = al);
267 void VFPCompareAndLoadFlags(const DwVfpRegister src1,
268 const double src2,
269 const Register fpscr_flags,
270 const Condition cond = al);
271
272
246 // --------------------------------------------------------------------------- 273 // ---------------------------------------------------------------------------
247 // Activation frames 274 // Activation frames
248 275
249 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } 276 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); }
250 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } 277 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); }
251 278
252 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } 279 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); }
253 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } 280 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); }
254 281
255 // Enter exit frame. 282 // Enter exit frame.
(...skipping 18 matching lines...) Expand all
274 Register map, 301 Register map,
275 Register scratch); 302 Register scratch);
276 303
277 // --------------------------------------------------------------------------- 304 // ---------------------------------------------------------------------------
278 // JavaScript invokes 305 // JavaScript invokes
279 306
280 // Invoke the JavaScript function code by either calling or jumping. 307 // Invoke the JavaScript function code by either calling or jumping.
281 void InvokeCode(Register code, 308 void InvokeCode(Register code,
282 const ParameterCount& expected, 309 const ParameterCount& expected,
283 const ParameterCount& actual, 310 const ParameterCount& actual,
284 InvokeFlag flag); 311 InvokeFlag flag,
312 PostCallGenerator* post_call_generator = NULL);
285 313
286 void InvokeCode(Handle<Code> code, 314 void InvokeCode(Handle<Code> code,
287 const ParameterCount& expected, 315 const ParameterCount& expected,
288 const ParameterCount& actual, 316 const ParameterCount& actual,
289 RelocInfo::Mode rmode, 317 RelocInfo::Mode rmode,
290 InvokeFlag flag); 318 InvokeFlag flag);
291 319
292 // Invoke the JavaScript function in the given register. Changes the 320 // Invoke the JavaScript function in the given register. Changes the
293 // current context to the context in the function before invoking. 321 // current context to the context in the function before invoking.
294 void InvokeFunction(Register function, 322 void InvokeFunction(Register function,
295 const ParameterCount& actual, 323 const ParameterCount& actual,
296 InvokeFlag flag); 324 InvokeFlag flag,
325 PostCallGenerator* post_call_generator = NULL);
297 326
298 void InvokeFunction(JSFunction* function, 327 void InvokeFunction(JSFunction* function,
299 const ParameterCount& actual, 328 const ParameterCount& actual,
300 InvokeFlag flag); 329 InvokeFlag flag);
301 330
302 void IsObjectJSObjectType(Register heap_object, 331 void IsObjectJSObjectType(Register heap_object,
303 Register map, 332 Register map,
304 Register scratch, 333 Register scratch,
305 Label* fail); 334 Label* fail);
306 335
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 : -1; 401 : -1;
373 ASSERT((type == -1) || 402 ASSERT((type == -1) ||
374 ((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER))); 403 ((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER)));
375 return type; 404 return type;
376 } 405 }
377 406
378 407
379 // --------------------------------------------------------------------------- 408 // ---------------------------------------------------------------------------
380 // Allocation support 409 // Allocation support
381 410
382 // Allocate an object in new space. The object_size is specified in words (not 411 // Allocate an object in new space. The object_size is specified
383 // bytes). If the new space is exhausted control continues at the gc_required 412 // either in bytes or in words if the allocation flag SIZE_IN_WORDS
384 // label. The allocated object is returned in result. If the flag 413 // is passed. If the new space is exhausted control continues at the
385 // tag_allocated_object is true the result is tagged as as a heap object. All 414 // gc_required label. The allocated object is returned in result. If
386 // registers are clobbered also when control continues at the gc_required 415 // the flag tag_allocated_object is true the result is tagged as as
387 // label. 416 // a heap object. All registers are clobbered also when control
417 // continues at the gc_required label.
388 void AllocateInNewSpace(int object_size, 418 void AllocateInNewSpace(int object_size,
389 Register result, 419 Register result,
390 Register scratch1, 420 Register scratch1,
391 Register scratch2, 421 Register scratch2,
392 Label* gc_required, 422 Label* gc_required,
393 AllocationFlags flags); 423 AllocationFlags flags);
394 void AllocateInNewSpace(Register object_size, 424 void AllocateInNewSpace(Register object_size,
395 Register result, 425 Register result,
396 Register scratch1, 426 Register scratch1,
397 Register scratch2, 427 Register scratch2,
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 // return address (unless this is somehow accounted for by the called 656 // return address (unless this is somehow accounted for by the called
627 // function). 657 // function).
628 void CallCFunction(ExternalReference function, int num_arguments); 658 void CallCFunction(ExternalReference function, int num_arguments);
629 void CallCFunction(Register function, Register scratch, int num_arguments); 659 void CallCFunction(Register function, Register scratch, int num_arguments);
630 660
631 // Jump to a runtime routine. 661 // Jump to a runtime routine.
632 void JumpToExternalReference(const ExternalReference& builtin); 662 void JumpToExternalReference(const ExternalReference& builtin);
633 663
634 // Invoke specified builtin JavaScript function. Adds an entry to 664 // Invoke specified builtin JavaScript function. Adds an entry to
635 // the unresolved list if the name does not resolve. 665 // the unresolved list if the name does not resolve.
636 void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags); 666 void InvokeBuiltin(Builtins::JavaScript id,
667 InvokeJSFlags flags,
668 PostCallGenerator* post_call_generator = NULL);
637 669
638 // Store the code object for the given builtin in the target register and 670 // Store the code object for the given builtin in the target register and
639 // setup the function in r1. 671 // setup the function in r1.
640 void GetBuiltinEntry(Register target, Builtins::JavaScript id); 672 void GetBuiltinEntry(Register target, Builtins::JavaScript id);
641 673
642 // Store the function for the given builtin in the target register. 674 // Store the function for the given builtin in the target register.
643 void GetBuiltinFunction(Register target, Builtins::JavaScript id); 675 void GetBuiltinFunction(Register target, Builtins::JavaScript id);
644 676
645 Handle<Object> CodeObject() { return code_object_; } 677 Handle<Object> CodeObject() { return code_object_; }
646 678
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 771
740 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); 772 void Jump(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
741 void Call(intptr_t target, RelocInfo::Mode rmode, Condition cond = al); 773 void Call(intptr_t target, RelocInfo::Mode rmode, Condition cond = al);
742 774
743 // Helper functions for generating invokes. 775 // Helper functions for generating invokes.
744 void InvokePrologue(const ParameterCount& expected, 776 void InvokePrologue(const ParameterCount& expected,
745 const ParameterCount& actual, 777 const ParameterCount& actual,
746 Handle<Code> code_constant, 778 Handle<Code> code_constant,
747 Register code_reg, 779 Register code_reg,
748 Label* done, 780 Label* done,
749 InvokeFlag flag); 781 InvokeFlag flag,
782 PostCallGenerator* post_call_generator = NULL);
750 783
751 // Activation support. 784 // Activation support.
752 void EnterFrame(StackFrame::Type type); 785 void EnterFrame(StackFrame::Type type);
753 void LeaveFrame(StackFrame::Type type); 786 void LeaveFrame(StackFrame::Type type);
754 787
755 void InitializeNewString(Register string, 788 void InitializeNewString(Register string,
756 Register length, 789 Register length,
757 Heap::RootListIndex map_index, 790 Heap::RootListIndex map_index,
758 Register scratch1, 791 Register scratch1,
759 Register scratch2); 792 Register scratch2);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 857 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
825 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 858 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
826 #else 859 #else
827 #define ACCESS_MASM(masm) masm-> 860 #define ACCESS_MASM(masm) masm->
828 #endif 861 #endif
829 862
830 863
831 } } // namespace v8::internal 864 } } // namespace v8::internal
832 865
833 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 866 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698