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

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

Issue 6518007: X64 Crankshaft: Fix error in pushed register indices for safepoints. Fixes i... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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 | « no previous file | src/x64/macro-assembler-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 void LeaveExitFrame(bool save_doubles = false); 164 void LeaveExitFrame(bool save_doubles = false);
165 165
166 // Leave the current exit frame. Expects/provides the return value in 166 // Leave the current exit frame. Expects/provides the return value in
167 // register rax (untouched). 167 // register rax (untouched).
168 void LeaveApiExitFrame(); 168 void LeaveApiExitFrame();
169 169
170 // Push and pop the registers that can hold pointers. 170 // Push and pop the registers that can hold pointers.
171 void PushSafepointRegisters() { Pushad(); } 171 void PushSafepointRegisters() { Pushad(); }
172 void PopSafepointRegisters() { Popad(); } 172 void PopSafepointRegisters() { Popad(); }
173 static int SafepointRegisterStackIndex(int reg_code) { 173 static int SafepointRegisterStackIndex(int reg_code) {
174 return kSafepointPushRegisterIndices[reg_code]; 174 return kRegistersPushedByPushad - 1 -
175 kSafepointPushRegisterIndices[reg_code];
175 } 176 }
176 177
177 178
178 // --------------------------------------------------------------------------- 179 // ---------------------------------------------------------------------------
179 // JavaScript invokes 180 // JavaScript invokes
180 181
181 // Invoke the JavaScript function code by either calling or jumping. 182 // Invoke the JavaScript function code by either calling or jumping.
182 void InvokeCode(Register code, 183 void InvokeCode(Register code,
183 const ParameterCount& expected, 184 const ParameterCount& expected,
184 const ParameterCount& actual, 185 const ParameterCount& actual,
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 // Verify restrictions about code generated in stubs. 960 // Verify restrictions about code generated in stubs.
960 void set_generating_stub(bool value) { generating_stub_ = value; } 961 void set_generating_stub(bool value) { generating_stub_ = value; }
961 bool generating_stub() { return generating_stub_; } 962 bool generating_stub() { return generating_stub_; }
962 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } 963 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
963 bool allow_stub_calls() { return allow_stub_calls_; } 964 bool allow_stub_calls() { return allow_stub_calls_; }
964 965
965 private: 966 private:
966 // Order general registers are pushed by Pushad. 967 // Order general registers are pushed by Pushad.
967 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14. 968 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14.
968 static int kSafepointPushRegisterIndices[Register::kNumRegisters]; 969 static int kSafepointPushRegisterIndices[Register::kNumRegisters];
970 static const int kRegistersPushedByPushad = 11;
971
969 bool generating_stub_; 972 bool generating_stub_;
970 bool allow_stub_calls_; 973 bool allow_stub_calls_;
971 974
972 // Returns a register holding the smi value. The register MUST NOT be 975 // Returns a register holding the smi value. The register MUST NOT be
973 // modified. It may be the "smi 1 constant" register. 976 // modified. It may be the "smi 1 constant" register.
974 Register GetSmiConstant(Smi* value); 977 Register GetSmiConstant(Smi* value);
975 978
976 // Moves the smi value to the destination register. 979 // Moves the smi value to the destination register.
977 void LoadSmiConstant(Register dst, Smi* value); 980 void LoadSmiConstant(Register dst, Smi* value);
978 981
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 Jump(adaptor, RelocInfo::CODE_TARGET); 1805 Jump(adaptor, RelocInfo::CODE_TARGET);
1803 } 1806 }
1804 bind(&invoke); 1807 bind(&invoke);
1805 } 1808 }
1806 } 1809 }
1807 1810
1808 1811
1809 } } // namespace v8::internal 1812 } } // namespace v8::internal
1810 1813
1811 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1814 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698