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

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

Issue 24205004: Rollback trunk to 3.21.16.2 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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/lithium-x64.cc ('k') | 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 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // memory (not GCed) on the stack accessible via StackSpaceOperand. 295 // memory (not GCed) on the stack accessible via StackSpaceOperand.
296 void EnterApiExitFrame(int arg_stack_space); 296 void EnterApiExitFrame(int arg_stack_space);
297 297
298 // Leave the current exit frame. Expects/provides the return value in 298 // Leave the current exit frame. Expects/provides the return value in
299 // register rax:rdx (untouched) and the pointer to the first 299 // register rax:rdx (untouched) and the pointer to the first
300 // argument in register rsi. 300 // argument in register rsi.
301 void LeaveExitFrame(bool save_doubles = false); 301 void LeaveExitFrame(bool save_doubles = false);
302 302
303 // Leave the current exit frame. Expects/provides the return value in 303 // Leave the current exit frame. Expects/provides the return value in
304 // register rax (untouched). 304 // register rax (untouched).
305 void LeaveApiExitFrame(bool restore_context); 305 void LeaveApiExitFrame();
306 306
307 // Push and pop the registers that can hold pointers. 307 // Push and pop the registers that can hold pointers.
308 void PushSafepointRegisters() { Pushad(); } 308 void PushSafepointRegisters() { Pushad(); }
309 void PopSafepointRegisters() { Popad(); } 309 void PopSafepointRegisters() { Popad(); }
310 // Store the value in register src in the safepoint register stack 310 // Store the value in register src in the safepoint register stack
311 // slot for register dst. 311 // slot for register dst.
312 void StoreToSafepointRegisterSlot(Register dst, const Immediate& imm); 312 void StoreToSafepointRegisterSlot(Register dst, const Immediate& imm);
313 void StoreToSafepointRegisterSlot(Register dst, Register src); 313 void StoreToSafepointRegisterSlot(Register dst, Register src);
314 void LoadFromSafepointRegisterSlot(Register dst, Register src); 314 void LoadFromSafepointRegisterSlot(Register dst, Register src);
315 315
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 void JumpIfNotUniqueName(Operand operand, Label* not_unique_name, 777 void JumpIfNotUniqueName(Operand operand, Label* not_unique_name,
778 Label::Distance distance = Label::kFar); 778 Label::Distance distance = Label::kFar);
779 779
780 // --------------------------------------------------------------------------- 780 // ---------------------------------------------------------------------------
781 // Macro instructions. 781 // Macro instructions.
782 782
783 // Load a register with a long value as efficiently as possible. 783 // Load a register with a long value as efficiently as possible.
784 void Set(Register dst, int64_t x); 784 void Set(Register dst, int64_t x);
785 void Set(const Operand& dst, int64_t x); 785 void Set(const Operand& dst, int64_t x);
786 786
787 // cvtsi2sd instruction only writes to the low 64-bit of dst register, which
788 // hinders register renaming and makes dependence chains longer. So we use
789 // xorps to clear the dst register before cvtsi2sd to solve this issue.
790 void Cvtlsi2sd(XMMRegister dst, Register src);
791 void Cvtlsi2sd(XMMRegister dst, const Operand& src);
792
793 // Move if the registers are not identical. 787 // Move if the registers are not identical.
794 void Move(Register target, Register source); 788 void Move(Register target, Register source);
795 789
796 // Bit-field support. 790 // Bit-field support.
797 void TestBit(const Operand& dst, int bit_index); 791 void TestBit(const Operand& dst, int bit_index);
798 792
799 // Handle support 793 // Handle support
800 void Move(Register dst, Handle<Object> source); 794 void Move(Register dst, Handle<Object> source);
801 void Move(const Operand& dst, Handle<Object> source); 795 void Move(const Operand& dst, Handle<Object> source);
802 void Cmp(Register dst, Handle<Object> source); 796 void Cmp(Register dst, Handle<Object> source);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 void PrepareCallApiFunction(int arg_stack_space); 1267 void PrepareCallApiFunction(int arg_stack_space);
1274 1268
1275 // Calls an API function. Allocates HandleScope, extracts returned value 1269 // Calls an API function. Allocates HandleScope, extracts returned value
1276 // from handle and propagates exceptions. Clobbers r14, r15, rbx and 1270 // from handle and propagates exceptions. Clobbers r14, r15, rbx and
1277 // caller-save registers. Restores context. On return removes 1271 // caller-save registers. Restores context. On return removes
1278 // stack_space * kPointerSize (GCed). 1272 // stack_space * kPointerSize (GCed).
1279 void CallApiFunctionAndReturn(Address function_address, 1273 void CallApiFunctionAndReturn(Address function_address,
1280 Address thunk_address, 1274 Address thunk_address,
1281 Register thunk_last_arg, 1275 Register thunk_last_arg,
1282 int stack_space, 1276 int stack_space,
1283 Operand return_value_operand, 1277 int return_value_offset_from_rbp);
1284 Operand* context_restore_operand);
1285 1278
1286 // Before calling a C-function from generated code, align arguments on stack. 1279 // Before calling a C-function from generated code, align arguments on stack.
1287 // After aligning the frame, arguments must be stored in rsp[0], rsp[8], 1280 // After aligning the frame, arguments must be stored in rsp[0], rsp[8],
1288 // etc., not pushed. The argument count assumes all arguments are word sized. 1281 // etc., not pushed. The argument count assumes all arguments are word sized.
1289 // The number of slots reserved for arguments depends on platform. On Windows 1282 // The number of slots reserved for arguments depends on platform. On Windows
1290 // stack slots are reserved for the arguments passed in registers. On other 1283 // stack slots are reserved for the arguments passed in registers. On other
1291 // platforms stack slots are only reserved for the arguments actually passed 1284 // platforms stack slots are only reserved for the arguments actually passed
1292 // on the stack. 1285 // on the stack.
1293 void PrepareCallCFunction(int num_arguments); 1286 void PrepareCallCFunction(int num_arguments);
1294 1287
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 Label::Distance near_jump = Label::kFar, 1423 Label::Distance near_jump = Label::kFar,
1431 const CallWrapper& call_wrapper = NullCallWrapper(), 1424 const CallWrapper& call_wrapper = NullCallWrapper(),
1432 CallKind call_kind = CALL_AS_METHOD); 1425 CallKind call_kind = CALL_AS_METHOD);
1433 1426
1434 void EnterExitFramePrologue(bool save_rax); 1427 void EnterExitFramePrologue(bool save_rax);
1435 1428
1436 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack 1429 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
1437 // accessible via StackSpaceOperand. 1430 // accessible via StackSpaceOperand.
1438 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); 1431 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles);
1439 1432
1440 void LeaveExitFrameEpilogue(bool restore_context); 1433 void LeaveExitFrameEpilogue();
1441 1434
1442 // Allocation support helpers. 1435 // Allocation support helpers.
1443 // Loads the top of new-space into the result register. 1436 // Loads the top of new-space into the result register.
1444 // Otherwise the address of the new-space top is loaded into scratch (if 1437 // Otherwise the address of the new-space top is loaded into scratch (if
1445 // scratch is valid), and the new-space top is loaded into result. 1438 // scratch is valid), and the new-space top is loaded into result.
1446 void LoadAllocationTopHelper(Register result, 1439 void LoadAllocationTopHelper(Register result,
1447 Register scratch, 1440 Register scratch,
1448 AllocationFlags flags); 1441 AllocationFlags flags);
1449 1442
1450 // Update allocation top with value in result_end register. 1443 // Update allocation top with value in result_end register.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 masm->popfq(); \ 1564 masm->popfq(); \
1572 } \ 1565 } \
1573 masm-> 1566 masm->
1574 #else 1567 #else
1575 #define ACCESS_MASM(masm) masm-> 1568 #define ACCESS_MASM(masm) masm->
1576 #endif 1569 #endif
1577 1570
1578 } } // namespace v8::internal 1571 } } // namespace v8::internal
1579 1572
1580 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1573 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698