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

Side by Side Diff: src/x64/macro-assembler-x64.h

Issue 202004: Move common enums for macro assemblers (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 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/macro-assembler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/macro-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698