OLD | NEW |
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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 Register addr_; | 1075 Register addr_; |
1076 Register scratch_; | 1076 Register scratch_; |
1077 | 1077 |
1078 #ifdef DEBUG | 1078 #ifdef DEBUG |
1079 void Print() { | 1079 void Print() { |
1080 PrintF("RecordWriteStub (object reg %d), (addr reg %d), (scratch reg %d)\n", | 1080 PrintF("RecordWriteStub (object reg %d), (addr reg %d), (scratch reg %d)\n", |
1081 object_.code(), addr_.code(), scratch_.code()); | 1081 object_.code(), addr_.code(), scratch_.code()); |
1082 } | 1082 } |
1083 #endif | 1083 #endif |
1084 | 1084 |
1085 // Minor key encoding in 12 bits of three registers (object, address and | 1085 // Minor key encoding in 12 bits. 4 bits for each of the three |
1086 // scratch) OOOOAAAASSSS. | 1086 // registers (object, address and scratch) OOOOAAAASSSS. |
1087 class ScratchBits: public BitField<uint32_t, 0, 4> {}; | 1087 class ScratchBits: public BitField<uint32_t, 0, 4> {}; |
1088 class AddressBits: public BitField<uint32_t, 4, 4> {}; | 1088 class AddressBits: public BitField<uint32_t, 4, 4> {}; |
1089 class ObjectBits: public BitField<uint32_t, 8, 4> {}; | 1089 class ObjectBits: public BitField<uint32_t, 8, 4> {}; |
1090 | 1090 |
1091 Major MajorKey() { return RecordWrite; } | 1091 Major MajorKey() { return RecordWrite; } |
1092 | 1092 |
1093 int MinorKey() { | 1093 int MinorKey() { |
1094 // Encode the registers. | 1094 // Encode the registers. |
1095 return ObjectBits::encode(object_.code()) | | 1095 return ObjectBits::encode(object_.code()) | |
1096 AddressBits::encode(addr_.code()) | | 1096 AddressBits::encode(addr_.code()) | |
1097 ScratchBits::encode(scratch_.code()); | 1097 ScratchBits::encode(scratch_.code()); |
1098 } | 1098 } |
1099 }; | 1099 }; |
1100 | 1100 |
1101 | 1101 |
1102 } } // namespace v8::internal | 1102 } } // namespace v8::internal |
1103 | 1103 |
1104 #endif // V8_IA32_CODEGEN_IA32_H_ | 1104 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |