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

Unified Diff: src/x87/code-stubs-x87.h

Issue 293743005: Introduce x87 port (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.h
diff --git a/src/ia32/code-stubs-ia32.h b/src/x87/code-stubs-x87.h
similarity index 88%
copy from src/ia32/code-stubs-ia32.h
copy to src/x87/code-stubs-x87.h
index 4cefec01777b721e212c0ff6ef3f58645d142c99..0248c9a6d8418b3c70bb505ddc957bf80bc11149 100644
--- a/src/ia32/code-stubs-ia32.h
+++ b/src/x87/code-stubs-x87.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_IA32_CODE_STUBS_IA32_H_
-#define V8_IA32_CODE_STUBS_IA32_H_
+#ifndef V8_X87_CODE_STUBS_X87_H_
+#define V8_X87_CODE_STUBS_X87_H_
#include "macro-assembler.h"
#include "ic-inl.h"
@@ -19,8 +19,8 @@ void ArrayNativeCode(MacroAssembler* masm,
class StoreBufferOverflowStub: public PlatformCodeStub {
public:
- StoreBufferOverflowStub(Isolate* isolate, SaveFPRegsMode save_fp)
- : PlatformCodeStub(isolate), save_doubles_(save_fp) { }
+ explicit StoreBufferOverflowStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) { }
void Generate(MacroAssembler* masm);
@@ -28,10 +28,8 @@ class StoreBufferOverflowStub: public PlatformCodeStub {
virtual bool SometimesSetsUpAFrame() { return false; }
private:
- SaveFPRegsMode save_doubles_;
-
Major MajorKey() { return StoreBufferOverflow; }
- int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; }
+ int MinorKey() { return 0; }
};
@@ -183,14 +181,12 @@ class RecordWriteStub: public PlatformCodeStub {
Register object,
Register value,
Register address,
- RememberedSetAction remembered_set_action,
- SaveFPRegsMode fp_mode)
+ RememberedSetAction remembered_set_action)
: PlatformCodeStub(isolate),
object_(object),
value_(value),
address_(address),
remembered_set_action_(remembered_set_action),
- save_fp_regs_mode_(fp_mode),
regs_(object, // An input reg.
address, // An input reg.
value) { // One scratch reg.
@@ -331,31 +327,12 @@ class RecordWriteStub: public PlatformCodeStub {
// saved registers that were not already preserved. The caller saved
// registers are eax, ecx and edx. The three scratch registers (incl. ecx)
// will be restored by other means so we don't bother pushing them here.
- void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) {
+ void SaveCallerSaveRegisters(MacroAssembler* masm) {
if (!scratch0_.is(eax) && !scratch1_.is(eax)) masm->push(eax);
if (!scratch0_.is(edx) && !scratch1_.is(edx)) masm->push(edx);
- if (mode == kSaveFPRegs) {
- masm->sub(esp,
- Immediate(kDoubleSize * (XMMRegister::kMaxNumRegisters - 1)));
- // Save all XMM registers except XMM0.
- for (int i = XMMRegister::kMaxNumRegisters - 1; i > 0; i--) {
- XMMRegister reg = XMMRegister::from_code(i);
- masm->movsd(Operand(esp, (i - 1) * kDoubleSize), reg);
- }
- }
}
- inline void RestoreCallerSaveRegisters(MacroAssembler*masm,
- SaveFPRegsMode mode) {
- if (mode == kSaveFPRegs) {
- // Restore all XMM registers except XMM0.
- for (int i = XMMRegister::kMaxNumRegisters - 1; i > 0; i--) {
- XMMRegister reg = XMMRegister::from_code(i);
- masm->movsd(reg, Operand(esp, (i - 1) * kDoubleSize));
- }
- masm->add(esp,
- Immediate(kDoubleSize * (XMMRegister::kMaxNumRegisters - 1)));
- }
+ inline void RestoreCallerSaveRegisters(MacroAssembler*masm) {
if (!scratch0_.is(edx) && !scratch1_.is(edx)) masm->pop(edx);
if (!scratch0_.is(eax) && !scratch1_.is(eax)) masm->pop(eax);
}
@@ -411,8 +388,7 @@ class RecordWriteStub: public PlatformCodeStub {
return ObjectBits::encode(object_.code()) |
ValueBits::encode(value_.code()) |
AddressBits::encode(address_.code()) |
- RememberedSetActionBits::encode(remembered_set_action_) |
- SaveFPRegsModeBits::encode(save_fp_regs_mode_);
+ RememberedSetActionBits::encode(remembered_set_action_);
}
void Activate(Code* code) {
@@ -423,17 +399,15 @@ class RecordWriteStub: public PlatformCodeStub {
class ValueBits: public BitField<int, 3, 3> {};
class AddressBits: public BitField<int, 6, 3> {};
class RememberedSetActionBits: public BitField<RememberedSetAction, 9, 1> {};
- class SaveFPRegsModeBits: public BitField<SaveFPRegsMode, 10, 1> {};
Register object_;
Register value_;
Register address_;
RememberedSetAction remembered_set_action_;
- SaveFPRegsMode save_fp_regs_mode_;
RegisterAllocation regs_;
};
} } // namespace v8::internal
-#endif // V8_IA32_CODE_STUBS_IA32_H_
+#endif // V8_X87_CODE_STUBS_X87_H_
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698