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

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

Issue 199903002: Introduce Push and Pop macro instructions for x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased with bleeding_edge Created 6 years, 9 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-codegen-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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 void MoveHeapObject(Register result, Handle<Object> object); 830 void MoveHeapObject(Register result, Handle<Object> object);
831 831
832 // Load a global cell into a register. 832 // Load a global cell into a register.
833 void LoadGlobalCell(Register dst, Handle<Cell> cell); 833 void LoadGlobalCell(Register dst, Handle<Cell> cell);
834 834
835 // Emit code to discard a non-negative number of pointer-sized elements 835 // Emit code to discard a non-negative number of pointer-sized elements
836 // from the stack, clobbering only the rsp register. 836 // from the stack, clobbering only the rsp register.
837 void Drop(int stack_elements); 837 void Drop(int stack_elements);
838 838
839 void Call(Label* target) { call(target); } 839 void Call(Label* target) { call(target); }
840 void Push(Register src) { push(src); } 840 void Push(Register src);
841 void Pop(Register dst) { pop(dst); } 841 void Push(const Operand& src);
842 void PushReturnAddressFrom(Register src) { push(src); } 842 void Push(Immediate value);
843 void PopReturnAddressTo(Register dst) { pop(dst); } 843 void PushImm32(int32_t imm32);
844 void Pop(Register dst);
845 void Pop(const Operand& dst);
846 void PushReturnAddressFrom(Register src) { pushq(src); }
847 void PopReturnAddressTo(Register dst) { popq(dst); }
844 void Move(Register dst, ExternalReference ext) { 848 void Move(Register dst, ExternalReference ext) {
845 movp(dst, reinterpret_cast<Address>(ext.address()), 849 movp(dst, reinterpret_cast<Address>(ext.address()),
846 RelocInfo::EXTERNAL_REFERENCE); 850 RelocInfo::EXTERNAL_REFERENCE);
847 } 851 }
848 852
849 // Loads a pointer into a register with a relocation mode. 853 // Loads a pointer into a register with a relocation mode.
850 void Move(Register dst, void* ptr, RelocInfo::Mode rmode) { 854 void Move(Register dst, void* ptr, RelocInfo::Mode rmode) {
851 // This method must not be used with heap object references. The stored 855 // This method must not be used with heap object references. The stored
852 // address is not GC safe. Use the handle version instead. 856 // address is not GC safe. Use the handle version instead.
853 ASSERT(rmode > RelocInfo::LAST_GCED_ENUM); 857 ASSERT(rmode > RelocInfo::LAST_GCED_ENUM);
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 1605
1602 #ifdef GENERATED_CODE_COVERAGE 1606 #ifdef GENERATED_CODE_COVERAGE
1603 extern void LogGeneratedCodeCoverage(const char* file_line); 1607 extern void LogGeneratedCodeCoverage(const char* file_line);
1604 #define CODE_COVERAGE_STRINGIFY(x) #x 1608 #define CODE_COVERAGE_STRINGIFY(x) #x
1605 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 1609 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
1606 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1610 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1607 #define ACCESS_MASM(masm) { \ 1611 #define ACCESS_MASM(masm) { \
1608 Address x64_coverage_function = FUNCTION_ADDR(LogGeneratedCodeCoverage); \ 1612 Address x64_coverage_function = FUNCTION_ADDR(LogGeneratedCodeCoverage); \
1609 masm->pushfq(); \ 1613 masm->pushfq(); \
1610 masm->Pushad(); \ 1614 masm->Pushad(); \
1611 masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \ 1615 masm->Push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \
1612 masm->Call(x64_coverage_function, RelocInfo::EXTERNAL_REFERENCE); \ 1616 masm->Call(x64_coverage_function, RelocInfo::EXTERNAL_REFERENCE); \
1613 masm->pop(rax); \ 1617 masm->Pop(rax); \
1614 masm->Popad(); \ 1618 masm->Popad(); \
1615 masm->popfq(); \ 1619 masm->popfq(); \
1616 } \ 1620 } \
1617 masm-> 1621 masm->
1618 #else 1622 #else
1619 #define ACCESS_MASM(masm) masm-> 1623 #define ACCESS_MASM(masm) masm->
1620 #endif 1624 #endif
1621 1625
1622 } } // namespace v8::internal 1626 } } // namespace v8::internal
1623 1627
1624 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1628 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698