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

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

Issue 11684005: Refactor and improve inlined double-aligned allocations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 11 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/codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 17 matching lines...) Expand all
28 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ 28 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_
29 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ 29 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_
30 30
31 #include "assembler.h" 31 #include "assembler.h"
32 #include "frames.h" 32 #include "frames.h"
33 #include "v8globals.h" 33 #include "v8globals.h"
34 34
35 namespace v8 { 35 namespace v8 {
36 namespace internal { 36 namespace internal {
37 37
38 // Flags used for the AllocateInNewSpace functions.
39 enum AllocationFlags {
40 // No special flags.
41 NO_ALLOCATION_FLAGS = 0,
42 // Return the pointer to the allocated already tagged as a heap object.
43 TAG_OBJECT = 1 << 0,
44 // The content of the result register already contains the allocation top in
45 // new space.
46 RESULT_CONTAINS_TOP = 1 << 1
47 };
48
49
50 // Convenience for platform-independent signatures. We do not normally 38 // Convenience for platform-independent signatures. We do not normally
51 // distinguish memory operands from other operands on ia32. 39 // distinguish memory operands from other operands on ia32.
52 typedef Operand MemOperand; 40 typedef Operand MemOperand;
53 41
54 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; 42 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
55 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; 43 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
56 44
57 45
46 enum RegisterValueType {
47 REGISTER_VALUE_IS_SMI,
48 REGISTER_VALUE_IS_INT32
49 };
50
51
58 bool AreAliased(Register r1, Register r2, Register r3, Register r4); 52 bool AreAliased(Register r1, Register r2, Register r3, Register r4);
59 53
60 54
61 // MacroAssembler implements a collection of frequently used macros. 55 // MacroAssembler implements a collection of frequently used macros.
62 class MacroAssembler: public Assembler { 56 class MacroAssembler: public Assembler {
63 public: 57 public:
64 // The isolate parameter can be NULL if the macro assembler should 58 // The isolate parameter can be NULL if the macro assembler should
65 // not use isolate-dependent functionality. In this case, it's the 59 // not use isolate-dependent functionality. In this case, it's the
66 // responsibility of the caller to never invoke such function on the 60 // responsibility of the caller to never invoke such function on the
67 // macro assembler. 61 // macro assembler.
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 void AllocateInNewSpace(int object_size, 563 void AllocateInNewSpace(int object_size,
570 Register result, 564 Register result,
571 Register result_end, 565 Register result_end,
572 Register scratch, 566 Register scratch,
573 Label* gc_required, 567 Label* gc_required,
574 AllocationFlags flags); 568 AllocationFlags flags);
575 569
576 void AllocateInNewSpace(int header_size, 570 void AllocateInNewSpace(int header_size,
577 ScaleFactor element_size, 571 ScaleFactor element_size,
578 Register element_count, 572 Register element_count,
573 RegisterValueType element_count_type,
579 Register result, 574 Register result,
580 Register result_end, 575 Register result_end,
581 Register scratch, 576 Register scratch,
582 Label* gc_required, 577 Label* gc_required,
583 AllocationFlags flags); 578 AllocationFlags flags);
584 579
585 void AllocateInNewSpace(Register object_size, 580 void AllocateInNewSpace(Register object_size,
586 Register result, 581 Register result,
587 Register result_end, 582 Register result_end,
588 Register scratch, 583 Register scratch,
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 } \ 995 } \
1001 masm-> 996 masm->
1002 #else 997 #else
1003 #define ACCESS_MASM(masm) masm-> 998 #define ACCESS_MASM(masm) masm->
1004 #endif 999 #endif
1005 1000
1006 1001
1007 } } // namespace v8::internal 1002 } } // namespace v8::internal
1008 1003
1009 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 1004 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698