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

Side by Side Diff: src/x64/code-stubs-x64.h

Issue 5986014: Remove RecordWriteStub from X64 and ARM platforms. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/arm/codegen-arm.cc ('k') | src/x64/codegen-x64.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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 mode_(mode), 80 mode_(mode),
81 flags_(flags), 81 flags_(flags),
82 args_in_registers_(false), 82 args_in_registers_(false),
83 args_reversed_(false), 83 args_reversed_(false),
84 static_operands_type_(operands_type), 84 static_operands_type_(operands_type),
85 runtime_operands_type_(BinaryOpIC::DEFAULT), 85 runtime_operands_type_(BinaryOpIC::DEFAULT),
86 name_(NULL) { 86 name_(NULL) {
87 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); 87 ASSERT(OpBits::is_valid(Token::NUM_TOKENS));
88 } 88 }
89 89
90 GenericBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info) 90 GenericBinaryOpStub(int key, BinaryOpIC::TypeInfo runtime_operands_type)
91 : op_(OpBits::decode(key)), 91 : op_(OpBits::decode(key)),
92 mode_(ModeBits::decode(key)), 92 mode_(ModeBits::decode(key)),
93 flags_(FlagBits::decode(key)), 93 flags_(FlagBits::decode(key)),
94 args_in_registers_(ArgsInRegistersBits::decode(key)), 94 args_in_registers_(ArgsInRegistersBits::decode(key)),
95 args_reversed_(ArgsReversedBits::decode(key)), 95 args_reversed_(ArgsReversedBits::decode(key)),
96 static_operands_type_(TypeInfo::ExpandedRepresentation( 96 static_operands_type_(TypeInfo::ExpandedRepresentation(
97 StaticTypeInfoBits::decode(key))), 97 StaticTypeInfoBits::decode(key))),
98 runtime_operands_type_(type_info), 98 runtime_operands_type_(runtime_operands_type),
99 name_(NULL) { 99 name_(NULL) {
100 } 100 }
101 101
102 // Generate code to call the stub with the supplied arguments. This will add 102 // Generate code to call the stub with the supplied arguments. This will add
103 // code at the call site to prepare arguments either in registers or on the 103 // code at the call site to prepare arguments either in registers or on the
104 // stack together with the actual call. 104 // stack together with the actual call.
105 void GenerateCall(MacroAssembler* masm, Register left, Register right); 105 void GenerateCall(MacroAssembler* masm, Register left, Register right);
106 void GenerateCall(MacroAssembler* masm, Register left, Smi* right); 106 void GenerateCall(MacroAssembler* masm, Register left, Smi* right);
107 void GenerateCall(MacroAssembler* masm, Smi* left, Register right); 107 void GenerateCall(MacroAssembler* masm, Smi* left, Register right);
108 108
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 const char* GetName() { return "NumberToStringStub"; } 341 const char* GetName() { return "NumberToStringStub"; }
342 342
343 #ifdef DEBUG 343 #ifdef DEBUG
344 void Print() { 344 void Print() {
345 PrintF("NumberToStringStub\n"); 345 PrintF("NumberToStringStub\n");
346 } 346 }
347 #endif 347 #endif
348 }; 348 };
349 349
350 350
351 class RecordWriteStub : public CodeStub {
352 public:
353 RecordWriteStub(Register object, Register addr, Register scratch)
354 : object_(object), addr_(addr), scratch_(scratch) { }
355
356 void Generate(MacroAssembler* masm);
357
358 private:
359 Register object_;
360 Register addr_;
361 Register scratch_;
362
363 #ifdef DEBUG
364 void Print() {
365 PrintF("RecordWriteStub (object reg %d), (addr reg %d), (scratch reg %d)\n",
366 object_.code(), addr_.code(), scratch_.code());
367 }
368 #endif
369
370 // Minor key encoding in 12 bits. 4 bits for each of the three
371 // registers (object, address and scratch) OOOOAAAASSSS.
372 class ScratchBits : public BitField<uint32_t, 0, 4> {};
373 class AddressBits : public BitField<uint32_t, 4, 4> {};
374 class ObjectBits : public BitField<uint32_t, 8, 4> {};
375
376 Major MajorKey() { return RecordWrite; }
377
378 int MinorKey() {
379 // Encode the registers.
380 return ObjectBits::encode(object_.code()) |
381 AddressBits::encode(addr_.code()) |
382 ScratchBits::encode(scratch_.code());
383 }
384 };
385
386
387 } } // namespace v8::internal 351 } } // namespace v8::internal
388 352
389 #endif // V8_X64_CODE_STUBS_X64_H_ 353 #endif // V8_X64_CODE_STUBS_X64_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698