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

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

Issue 4654002: Move common static helpers from codegen to the macro-assembler files. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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/x64/full-codegen-x64.cc ('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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 // Generate an Operand for loading an indexed field from an object. 976 // Generate an Operand for loading an indexed field from an object.
977 static inline Operand FieldOperand(Register object, 977 static inline Operand FieldOperand(Register object,
978 Register index, 978 Register index,
979 ScaleFactor scale, 979 ScaleFactor scale,
980 int offset) { 980 int offset) {
981 return Operand(object, index, scale, offset - kHeapObjectTag); 981 return Operand(object, index, scale, offset - kHeapObjectTag);
982 } 982 }
983 983
984 984
985 static inline Operand ContextOperand(Register context, int index) {
986 return Operand(context, Context::SlotOffset(index));
987 }
988
989
990 static inline Operand GlobalObjectOperand() {
991 return ContextOperand(rsi, Context::GLOBAL_INDEX);
992 }
993
994
995
985 #ifdef GENERATED_CODE_COVERAGE 996 #ifdef GENERATED_CODE_COVERAGE
986 extern void LogGeneratedCodeCoverage(const char* file_line); 997 extern void LogGeneratedCodeCoverage(const char* file_line);
987 #define CODE_COVERAGE_STRINGIFY(x) #x 998 #define CODE_COVERAGE_STRINGIFY(x) #x
988 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 999 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
989 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1000 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
990 #define ACCESS_MASM(masm) { \ 1001 #define ACCESS_MASM(masm) { \
991 byte* x64_coverage_function = \ 1002 byte* x64_coverage_function = \
992 reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \ 1003 reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \
993 masm->pushfd(); \ 1004 masm->pushfd(); \
994 masm->pushad(); \ 1005 masm->pushad(); \
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 Jump(adaptor, RelocInfo::CODE_TARGET); 1702 Jump(adaptor, RelocInfo::CODE_TARGET);
1692 } 1703 }
1693 bind(&invoke); 1704 bind(&invoke);
1694 } 1705 }
1695 } 1706 }
1696 1707
1697 1708
1698 } } // namespace v8::internal 1709 } } // namespace v8::internal
1699 1710
1700 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1711 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698