OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 15 matching lines...) Expand all Loading... |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ | 28 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
29 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 29 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
30 | 30 |
31 #include "assembler.h" | 31 #include "assembler.h" |
32 | 32 |
33 namespace v8 { | 33 namespace v8 { |
34 namespace internal { | 34 namespace internal { |
35 | 35 |
| 36 static const Register kScratchRegister = r10; |
| 37 |
36 // Forward declaration. | 38 // Forward declaration. |
37 class JumpTarget; | 39 class JumpTarget; |
38 | 40 |
39 | 41 |
40 // Helper types to make flags easier to read at call sites. | 42 // Helper types to make flags easier to read at call sites. |
41 enum InvokeFlag { | 43 enum InvokeFlag { |
42 CALL_FUNCTION, | 44 CALL_FUNCTION, |
43 JUMP_FUNCTION | 45 JUMP_FUNCTION |
44 }; | 46 }; |
45 | 47 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 InvokeFlag flag); | 132 InvokeFlag flag); |
131 | 133 |
132 // Invoke specified builtin JavaScript function. Adds an entry to | 134 // Invoke specified builtin JavaScript function. Adds an entry to |
133 // the unresolved list if the name does not resolve. | 135 // the unresolved list if the name does not resolve. |
134 void InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag); | 136 void InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag); |
135 | 137 |
136 // Store the code object for the given builtin in the target register. | 138 // Store the code object for the given builtin in the target register. |
137 void GetBuiltinEntry(Register target, Builtins::JavaScript id); | 139 void GetBuiltinEntry(Register target, Builtins::JavaScript id); |
138 | 140 |
139 // Expression support | 141 // Expression support |
140 void Set(Register dst, const Immediate& x); | 142 void Set(Register dst, int64_t x); |
141 void Set(const Operand& dst, const Immediate& x); | 143 void Set(Operand& dst, int64_t x); |
142 | 144 |
143 // Compare object type for heap object. | 145 // Compare object type for heap object. |
144 // Incoming register is heap_object and outgoing register is map. | 146 // Incoming register is heap_object and outgoing register is map. |
145 void CmpObjectType(Register heap_object, InstanceType type, Register map); | 147 void CmpObjectType(Register heap_object, InstanceType type, Register map); |
146 | 148 |
147 // Compare instance type for map. | 149 // Compare instance type for map. |
148 void CmpInstanceType(Register map, InstanceType type); | 150 void CmpInstanceType(Register map, InstanceType type); |
149 | 151 |
150 // FCmp is similar to integer cmp, but requires unsigned | 152 // FCmp is similar to integer cmp, but requires unsigned |
151 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). | 153 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } \ | 365 } \ |
364 masm-> | 366 masm-> |
365 #else | 367 #else |
366 #define ACCESS_MASM(masm) masm-> | 368 #define ACCESS_MASM(masm) masm-> |
367 #endif | 369 #endif |
368 | 370 |
369 | 371 |
370 } } // namespace v8::internal | 372 } } // namespace v8::internal |
371 | 373 |
372 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 374 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |