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

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

Issue 140553004: Introduce Assembler::RelocInfoNone static function for X64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/x64/assembler-x64.h ('k') | src/x64/code-stubs-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()->movp(kScratchRegister, target, RelocInfo::NONE64); 113 patcher.masm()->movp(kScratchRegister, target, Assembler::RelocInfoNone());
114 patcher.masm()->call(kScratchRegister); 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 }
(...skipping 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 bool RelocInfo::IsCodedSpecially() { 3181 bool RelocInfo::IsCodedSpecially() {
3182 // The deserializer needs to know whether a pointer is specially coded. Being 3182 // The deserializer needs to know whether a pointer is specially coded. Being
3183 // specially coded on x64 means that it is a relative 32 bit address, as used 3183 // specially coded on x64 means that it is a relative 32 bit address, as used
3184 // by branch instructions. 3184 // by branch instructions.
3185 return (1 << rmode_) & kApplyMask; 3185 return (1 << rmode_) & kApplyMask;
3186 } 3186 }
3187 3187
3188 } } // namespace v8::internal 3188 } } // namespace v8::internal
3189 3189
3190 #endif // V8_TARGET_ARCH_X64 3190 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698