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

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

Issue 6475012: X64 Crankshaft: Fix bug in pushed registers at safepoints. Fixes issue 1153 ... (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') | src/x64/macro-assembler-x64.cc » ('J')
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 kRegistersPushedByPushad - 1 - 174 return kNumSafepointRegisters - 1 -
175 kSafepointPushRegisterIndices[reg_code]; 175 kSafepointPushRegisterIndices[reg_code];
176 } 176 }
177 177
178 178
179 // --------------------------------------------------------------------------- 179 // ---------------------------------------------------------------------------
180 // JavaScript invokes 180 // JavaScript invokes
181 181
182 // Invoke the JavaScript function code by either calling or jumping. 182 // Invoke the JavaScript function code by either calling or jumping.
183 void InvokeCode(Register code, 183 void InvokeCode(Register code,
184 const ParameterCount& expected, 184 const ParameterCount& expected,
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 // Verify restrictions about code generated in stubs. 960 // Verify restrictions about code generated in stubs.
961 void set_generating_stub(bool value) { generating_stub_ = value; } 961 void set_generating_stub(bool value) { generating_stub_ = value; }
962 bool generating_stub() { return generating_stub_; } 962 bool generating_stub() { return generating_stub_; }
963 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } 963 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
964 bool allow_stub_calls() { return allow_stub_calls_; } 964 bool allow_stub_calls() { return allow_stub_calls_; }
965 965
966 private: 966 private:
967 // Order general registers are pushed by Pushad. 967 // Order general registers are pushed by Pushad.
968 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14. 968 // rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14.
969 static int kSafepointPushRegisterIndices[Register::kNumRegisters]; 969 static int kSafepointPushRegisterIndices[Register::kNumRegisters];
970 static const int kRegistersPushedByPushad = 11; 970 static const int kNumSafepointSavedRegisters = 11;
971 971
972 bool generating_stub_; 972 bool generating_stub_;
973 bool allow_stub_calls_; 973 bool allow_stub_calls_;
974 974
975 // 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
976 // modified. It may be the "smi 1 constant" register. 976 // modified. It may be the "smi 1 constant" register.
977 Register GetSmiConstant(Smi* value); 977 Register GetSmiConstant(Smi* value);
978 978
979 // Moves the smi value to the destination register. 979 // Moves the smi value to the destination register.
980 void LoadSmiConstant(Register dst, Smi* value); 980 void LoadSmiConstant(Register dst, Smi* value);
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 Jump(adaptor, RelocInfo::CODE_TARGET); 1805 Jump(adaptor, RelocInfo::CODE_TARGET);
1806 } 1806 }
1807 bind(&invoke); 1807 bind(&invoke);
1808 } 1808 }
1809 } 1809 }
1810 1810
1811 1811
1812 } } // namespace v8::internal 1812 } } // namespace v8::internal
1813 1813
1814 #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') | src/x64/macro-assembler-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698