OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Default scratch register used by MacroAssembler (and other code that needs | 36 // Default scratch register used by MacroAssembler (and other code that needs |
37 // a spare register). The register isn't callee save, and not used by the | 37 // a spare register). The register isn't callee save, and not used by the |
38 // function calling convention. | 38 // function calling convention. |
39 static const Register kScratchRegister = r10; | 39 static const Register kScratchRegister = r10; |
40 | 40 |
41 // Forward declaration. | 41 // Forward declaration. |
42 class JumpTarget; | 42 class JumpTarget; |
43 | 43 |
44 | 44 |
45 // Helper types to make flags easier to read at call sites. | |
46 enum InvokeFlag { | |
47 CALL_FUNCTION, | |
48 JUMP_FUNCTION | |
49 }; | |
50 | |
51 enum CodeLocation { | |
52 IN_JAVASCRIPT, | |
53 IN_JS_ENTRY, | |
54 IN_C_ENTRY | |
55 }; | |
56 | |
57 enum HandlerType { | |
58 TRY_CATCH_HANDLER, | |
59 TRY_FINALLY_HANDLER, | |
60 JS_ENTRY_HANDLER | |
61 }; | |
62 | |
63 | |
64 // Flags used for the AllocateObjectInNewSpace functions. | |
65 enum AllocationFlags { | |
66 // No special flags. | |
67 NO_ALLOCATION_FLAGS = 0, | |
68 // Return the pointer to the allocated already tagged as a heap object. | |
69 TAG_OBJECT = 1 << 0, | |
70 // The content of the result register already contains the allocation top in | |
71 // new space. | |
72 RESULT_CONTAINS_TOP = 1 << 1 | |
73 }; | |
74 | |
75 | |
76 // MacroAssembler implements a collection of frequently used macros. | 45 // MacroAssembler implements a collection of frequently used macros. |
77 class MacroAssembler: public Assembler { | 46 class MacroAssembler: public Assembler { |
78 public: | 47 public: |
79 MacroAssembler(void* buffer, int size); | 48 MacroAssembler(void* buffer, int size); |
80 | 49 |
81 void LoadRoot(Register destination, Heap::RootListIndex index); | 50 void LoadRoot(Register destination, Heap::RootListIndex index); |
82 void CompareRoot(Register with, Heap::RootListIndex index); | 51 void CompareRoot(Register with, Heap::RootListIndex index); |
83 void PushRoot(Heap::RootListIndex index); | 52 void PushRoot(Heap::RootListIndex index); |
84 | 53 |
85 // --------------------------------------------------------------------------- | 54 // --------------------------------------------------------------------------- |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } \ | 434 } \ |
466 masm-> | 435 masm-> |
467 #else | 436 #else |
468 #define ACCESS_MASM(masm) masm-> | 437 #define ACCESS_MASM(masm) masm-> |
469 #endif | 438 #endif |
470 | 439 |
471 | 440 |
472 } } // namespace v8::internal | 441 } } // namespace v8::internal |
473 | 442 |
474 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 443 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |