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

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

Issue 7122003: Make x64 to use the RecordWrite stub. This is a step towards getting (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 6 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.h ('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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 48
49 // Convenience for platform-independent signatures. We do not normally 49 // Convenience for platform-independent signatures. We do not normally
50 // distinguish memory operands from other operands on ia32. 50 // distinguish memory operands from other operands on ia32.
51 typedef Operand MemOperand; 51 typedef Operand MemOperand;
52 52
53 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; 53 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
54 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; 54 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
55 55
56 56
57 bool Aliasing(Register r1, Register r2, Register r3, Register r4); 57 bool AreAliased(Register r1, Register r2, Register r3, Register r4);
58 58
59 59
60 // MacroAssembler implements a collection of frequently used macros. 60 // MacroAssembler implements a collection of frequently used macros.
61 class MacroAssembler: public Assembler { 61 class MacroAssembler: public Assembler {
62 public: 62 public:
63 // The isolate parameter can be NULL if the macro assembler should 63 // The isolate parameter can be NULL if the macro assembler should
64 // not use isolate-dependent functionality. In this case, it's the 64 // not use isolate-dependent functionality. In this case, it's the
65 // responsibility of the caller to never invoke such function on the 65 // responsibility of the caller to never invoke such function on the
66 // macro assembler. 66 // macro assembler.
67 MacroAssembler(Isolate* isolate, void* buffer, int size); 67 MacroAssembler(Isolate* isolate, void* buffer, int size);
68 68
69 // --------------------------------------------------------------------------- 69 // ---------------------------------------------------------------------------
70 // GC Support 70 // GC Support
71 71
72 void IncrementalMarkingRecordWriteHelper(Register object, 72 void IncrementalMarkingRecordWriteHelper(Register object,
73 Register value, 73 Register value,
74 Register address); 74 Register address);
75 75
76 enum RememberedSetFinalAction { 76 enum RememberedSetFinalAction {
77 kReturnAtEnd, 77 kReturnAtEnd,
78 kFallThroughAtEnd 78 kFallThroughAtEnd
79 }; 79 };
80 80
81 // For page containing |object| mark region covering |addr| dirty. 81 // Record in the remembered set the fact that we have a pointer to new space
82 // RememberedSetHelper only works if the object is not in new 82 // at the address pointed to by the addr register. Only works if addr is not
83 // space. 83 // in new space.
84 void RememberedSetHelper(Register addr, 84 void RememberedSetHelper(Register addr,
85 Register scratch, 85 Register scratch,
86 SaveFPRegsMode save_fp, 86 SaveFPRegsMode save_fp,
87 RememberedSetFinalAction and_then); 87 RememberedSetFinalAction and_then);
88 88
89 void CheckPageFlag(Register object, 89 void CheckPageFlag(Register object,
90 Register scratch, 90 Register scratch,
91 MemoryChunk::MemoryChunkFlags flag, 91 MemoryChunk::MemoryChunkFlags flag,
92 Condition cc, 92 Condition cc,
93 Label* condition_met, 93 Label* condition_met,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 // Checks whether an object is data-only, ie it does need to be scanned by the 132 // Checks whether an object is data-only, ie it does need to be scanned by the
133 // garbage collector. 133 // garbage collector.
134 void IsDataObject(Register value, 134 void IsDataObject(Register value,
135 Register scratch, 135 Register scratch,
136 Label* not_data_object, 136 Label* not_data_object,
137 Label::Distance not_data_object_distance); 137 Label::Distance not_data_object_distance);
138 138
139 // Notify the garbage collector that we wrote a pointer into an object. 139 // Notify the garbage collector that we wrote a pointer into an object.
140 // |object| is the object being stored into, |value| is the object being 140 // |object| is the object being stored into, |value| is the object being
141 // stored. All registers are clobbered by the operation. RecordWriteField 141 // stored. value and scratch registers are clobbered by the operation.
142 // filters out smis so it does not update the write barrier if the value is a 142 // The offset is the offset from the start of the object, not the offset from
143 // smi. The offset is the offset from the start of the object, not the offset 143 // the tagged HeapObject pointer. For use with FieldOperand(reg, off).
144 // from the tagged HeapObject pointer. For use with FieldOperand(reg, off).
145 void RecordWriteField( 144 void RecordWriteField(
146 Register object, 145 Register object,
147 int offset, 146 int offset,
148 Register value, 147 Register value,
149 Register scratch, 148 Register scratch,
150 SaveFPRegsMode save_fp, 149 SaveFPRegsMode save_fp,
151 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 150 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
152 SmiCheck smi_check = INLINE_SMI_CHECK); 151 SmiCheck smi_check = INLINE_SMI_CHECK);
153 152
154 // As above, but the offset has the tag presubtracted. For use with 153 // As above, but the offset has the tag presubtracted. For use with
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 373
375 // Modifies the register even if it does not contain a Smi! 374 // Modifies the register even if it does not contain a Smi!
376 void SmiUntag(Register reg, Label* is_smi) { 375 void SmiUntag(Register reg, Label* is_smi) {
377 ASSERT(kSmiTagSize == 1); 376 ASSERT(kSmiTagSize == 1);
378 sar(reg, kSmiTagSize); 377 sar(reg, kSmiTagSize);
379 ASSERT(kSmiTag == 0); 378 ASSERT(kSmiTag == 0);
380 j(not_carry, is_smi); 379 j(not_carry, is_smi);
381 } 380 }
382 381
383 // Jump the register contains a smi. 382 // Jump the register contains a smi.
384 inline void JumpIfSmi(Register value, Label* smi_label) { 383 inline void JumpIfSmi(Register value,
384 Label* smi_label,
385 Label::Distance distance = Label::kFar) {
385 test(value, Immediate(kSmiTagMask)); 386 test(value, Immediate(kSmiTagMask));
386 j(zero, smi_label); 387 j(zero, smi_label, distance);
387 } 388 }
388 // Jump if register contain a non-smi. 389 // Jump if register contain a non-smi.
389 inline void JumpIfNotSmi(Register value, Label* not_smi_label) { 390 inline void JumpIfNotSmi(Register value, Label* not_smi_label) {
390 test(value, Immediate(kSmiTagMask)); 391 test(value, Immediate(kSmiTagMask));
391 j(not_zero, not_smi_label); 392 j(not_zero, not_smi_label);
392 } 393 }
393 394
394 void LoadInstanceDescriptors(Register map, Register descriptors); 395 void LoadInstanceDescriptors(Register map, Register descriptors);
395 396
396 void LoadPowerOf2(XMMRegister dst, Register scratch, int power); 397 void LoadPowerOf2(XMMRegister dst, Register scratch, int power);
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 } \ 873 } \
873 masm-> 874 masm->
874 #else 875 #else
875 #define ACCESS_MASM(masm) masm-> 876 #define ACCESS_MASM(masm) masm->
876 #endif 877 #endif
877 878
878 879
879 } } // namespace v8::internal 880 } } // namespace v8::internal
880 881
881 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 882 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698