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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 38613003: Use PopReturnAddressTo and PushReturnAddressFrom in Generate_MarkCodeAsExecutedOnce builtin function (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Create a code patcher. 103 // Create a code patcher.
104 CodePatcher patcher(pc_, code_size); 104 CodePatcher patcher(pc_, code_size);
105 105
106 // Add a label for checking the size of the code used for returning. 106 // Add a label for checking the size of the code used for returning.
107 #ifdef DEBUG 107 #ifdef DEBUG
108 Label check_codesize; 108 Label check_codesize;
109 patcher.masm()->bind(&check_codesize); 109 patcher.masm()->bind(&check_codesize);
110 #endif 110 #endif
111 111
112 // Patch the code. 112 // Patch the code.
113 patcher.masm()->movq(r10, target, RelocInfo::NONE64); 113 patcher.masm()->movq(kScratchRegister, target, RelocInfo::NONE64);
114 patcher.masm()->call(r10); 114 patcher.masm()->call(kScratchRegister);
115 115
116 // Check that the size of the code generated is as expected. 116 // Check that the size of the code generated is as expected.
117 ASSERT_EQ(Assembler::kCallSequenceLength, 117 ASSERT_EQ(Assembler::kCallSequenceLength,
118 patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); 118 patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize));
119 119
120 // Add the requested number of int3 instructions after the call. 120 // Add the requested number of int3 instructions after the call.
121 for (int i = 0; i < guard_bytes; i++) { 121 for (int i = 0; i < guard_bytes; i++) {
122 patcher.masm()->int3(); 122 patcher.masm()->int3();
123 } 123 }
124 } 124 }
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 bool RelocInfo::IsCodedSpecially() { 3078 bool RelocInfo::IsCodedSpecially() {
3079 // The deserializer needs to know whether a pointer is specially coded. Being 3079 // The deserializer needs to know whether a pointer is specially coded. Being
3080 // specially coded on x64 means that it is a relative 32 bit address, as used 3080 // specially coded on x64 means that it is a relative 32 bit address, as used
3081 // by branch instructions. 3081 // by branch instructions.
3082 return (1 << rmode_) & kApplyMask; 3082 return (1 << rmode_) & kApplyMask;
3083 } 3083 }
3084 3084
3085 } } // namespace v8::internal 3085 } } // namespace v8::internal
3086 3086
3087 #endif // V8_TARGET_ARCH_X64 3087 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698