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

Side by Side Diff: src/ia32/codegen-ia32.h

Issue 669061: First take on custom call generators. (Closed)
Patch Set: Ultimate version Created 10 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
« no previous file with comments | « src/factory.cc ('k') | src/ia32/codegen-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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 const char* GetName() { return "NumberToStringStub"; } 970 const char* GetName() { return "NumberToStringStub"; }
971 971
972 #ifdef DEBUG 972 #ifdef DEBUG
973 void Print() { 973 void Print() {
974 PrintF("NumberToStringStub\n"); 974 PrintF("NumberToStringStub\n");
975 } 975 }
976 #endif 976 #endif
977 }; 977 };
978 978
979 979
980 class RecordWriteStub : public CodeStub {
981 public:
982 RecordWriteStub(Register object, Register addr, Register scratch)
983 : object_(object), addr_(addr), scratch_(scratch) { }
984
985 void Generate(MacroAssembler* masm);
986
987 private:
988 Register object_;
989 Register addr_;
990 Register scratch_;
991
992 #ifdef DEBUG
993 void Print() {
994 PrintF("RecordWriteStub (object reg %d), (addr reg %d), (scratch reg %d)\n",
995 object_.code(), addr_.code(), scratch_.code());
996 }
997 #endif
998
999 // Minor key encoding in 12 bits of three registers (object, address and
1000 // scratch) OOOOAAAASSSS.
1001 class ScratchBits: public BitField<uint32_t, 0, 4> {};
1002 class AddressBits: public BitField<uint32_t, 4, 4> {};
1003 class ObjectBits: public BitField<uint32_t, 8, 4> {};
1004
1005 Major MajorKey() { return RecordWrite; }
1006
1007 int MinorKey() {
1008 // Encode the registers.
1009 return ObjectBits::encode(object_.code()) |
1010 AddressBits::encode(addr_.code()) |
1011 ScratchBits::encode(scratch_.code());
1012 }
1013 };
1014
1015
980 } } // namespace v8::internal 1016 } } // namespace v8::internal
981 1017
982 #endif // V8_IA32_CODEGEN_IA32_H_ 1018 #endif // V8_IA32_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698