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

Unified Diff: src/x87/macro-assembler-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/lithium-x87.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/macro-assembler-x87.h
diff --git a/src/ia32/macro-assembler-ia32.h b/src/x87/macro-assembler-x87.h
similarity index 95%
copy from src/ia32/macro-assembler-ia32.h
copy to src/x87/macro-assembler-x87.h
index 71e7427d2d46259b10060f1021aada1920ecba44..e5206da9f645d1218310b92b9d414bfca77b2812 100644
--- a/src/ia32/macro-assembler-ia32.h
+++ b/src/x87/macro-assembler-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_MACRO_ASSEMBLER_IA32_H_
-#define V8_IA32_MACRO_ASSEMBLER_IA32_H_
+#ifndef V8_X87_MACRO_ASSEMBLER_X87_H_
+#define V8_X87_MACRO_ASSEMBLER_X87_H_
#include "assembler.h"
#include "frames.h"
@@ -63,7 +63,6 @@ class MacroAssembler: public Assembler {
void RememberedSetHelper(Register object, // Used for debug code.
Register addr,
Register scratch,
- SaveFPRegsMode save_fp,
RememberedSetFinalAction and_then);
void CheckPageFlag(Register object,
@@ -138,7 +137,6 @@ class MacroAssembler: public Assembler {
int offset,
Register value,
Register scratch,
- SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
SmiCheck smi_check = INLINE_SMI_CHECK);
@@ -149,14 +147,12 @@ class MacroAssembler: public Assembler {
int offset,
Register value,
Register scratch,
- SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
SmiCheck smi_check = INLINE_SMI_CHECK) {
RecordWriteField(context,
offset + kHeapObjectTag,
value,
scratch,
- save_fp,
remembered_set_action,
smi_check);
}
@@ -171,7 +167,6 @@ class MacroAssembler: public Assembler {
Register array,
Register value,
Register index,
- SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
SmiCheck smi_check = INLINE_SMI_CHECK);
@@ -184,7 +179,6 @@ class MacroAssembler: public Assembler {
Register object,
Register address,
Register value,
- SaveFPRegsMode save_fp,
RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
SmiCheck smi_check = INLINE_SMI_CHECK);
@@ -195,8 +189,7 @@ class MacroAssembler: public Assembler {
Register object,
Handle<Map> map,
Register scratch1,
- Register scratch2,
- SaveFPRegsMode save_fp);
+ Register scratch2);
// ---------------------------------------------------------------------------
// Debugger Support
@@ -211,14 +204,14 @@ class MacroAssembler: public Assembler {
// arguments in register eax and sets up the number of arguments in
// register edi and the pointer to the first argument in register
// esi.
- void EnterExitFrame(bool save_doubles);
+ void EnterExitFrame();
void EnterApiExitFrame(int argc);
// Leave the current exit frame. Expects the return value in
// register eax:edx (untouched) and the pointer to the first
// argument in register esi.
- void LeaveExitFrame(bool save_doubles);
+ void LeaveExitFrame();
// Leave the current exit frame. Expects the return value in
// register eax (untouched).
@@ -326,12 +319,6 @@ class MacroAssembler: public Assembler {
void GetBuiltinEntry(Register target, Builtins::JavaScript id);
// Expression support
- // cvtsi2sd instruction only writes to the low 64-bit of dst register, which
- // hinders register renaming and makes dependence chains longer. So we use
- // xorps to clear the dst register before cvtsi2sd to solve this issue.
- void Cvtsi2sd(XMMRegister dst, Register src) { Cvtsi2sd(dst, Operand(src)); }
- void Cvtsi2sd(XMMRegister dst, const Operand& src);
-
// Support for constant splitting.
bool IsUnsafeImmediate(const Immediate& x);
void SafeMove(Register dst, const Immediate& x);
@@ -368,8 +355,7 @@ class MacroAssembler: public Assembler {
void StoreNumberToDoubleElements(Register maybe_number,
Register elements,
Register key,
- Register scratch1,
- XMMRegister scratch2,
+ Register scratch,
Label* fail,
int offset = 0);
@@ -430,21 +416,16 @@ class MacroAssembler: public Assembler {
void ClampUint8(Register reg);
- void ClampDoubleToUint8(XMMRegister input_reg,
- XMMRegister scratch_reg,
- Register result_reg);
-
void SlowTruncateToI(Register result_reg, Register input_reg,
int offset = HeapNumber::kValueOffset - kHeapObjectTag);
void TruncateHeapNumberToI(Register result_reg, Register input_reg);
- void TruncateDoubleToI(Register result_reg, XMMRegister input_reg);
+ void TruncateX87TOSToI(Register result_reg);
- void DoubleToI(Register result_reg, XMMRegister input_reg,
- XMMRegister scratch, MinusZeroMode minus_zero_mode,
+ void X87TOSToI(Register result_reg, MinusZeroMode minus_zero_mode,
Label* conversion_failed, Label::Distance dst = Label::kFar);
- void TaggedToI(Register result_reg, Register input_reg, XMMRegister temp,
+ void TaggedToI(Register result_reg, Register input_reg,
MinusZeroMode minus_zero_mode, Label* lost_precision);
// Smi tagging support.
@@ -465,7 +446,7 @@ class MacroAssembler: public Assembler {
j(not_carry, is_smi);
}
- void LoadUint32(XMMRegister dst, Register src, XMMRegister scratch);
+ void LoadUint32NoSSE2(Register src);
// Jump the register contains a smi.
inline void JumpIfSmi(Register value,
@@ -500,7 +481,6 @@ class MacroAssembler: public Assembler {
sar(reg, shift);
and_(reg, Immediate(mask));
}
- void LoadPowerOf2(XMMRegister dst, Register scratch, int power);
// Abort execution if argument is not a number, enabled via --debug-code.
void AssertNumber(Register object);
@@ -717,19 +697,14 @@ class MacroAssembler: public Assembler {
void StubReturn(int argc);
// Call a runtime routine.
- void CallRuntime(const Runtime::Function* f,
- int num_arguments,
- SaveFPRegsMode save_doubles = kDontSaveFPRegs);
- void CallRuntimeSaveDoubles(Runtime::FunctionId id) {
+ void CallRuntime(const Runtime::Function* f, int num_arguments);
+ // Convenience function: Same as above, but takes the fid instead.
+ void CallRuntime(Runtime::FunctionId id) {
const Runtime::Function* function = Runtime::FunctionForId(id);
- CallRuntime(function, function->nargs, kSaveFPRegs);
+ CallRuntime(function, function->nargs);
}
-
- // Convenience function: Same as above, but takes the fid instead.
- void CallRuntime(Runtime::FunctionId id,
- int num_arguments,
- SaveFPRegsMode save_doubles = kDontSaveFPRegs) {
- CallRuntime(Runtime::FunctionForId(id), num_arguments, save_doubles);
+ void CallRuntime(Runtime::FunctionId id, int num_arguments) {
+ CallRuntime(Runtime::FunctionForId(id), num_arguments);
}
// Convenience function: call an external reference.
@@ -815,9 +790,6 @@ class MacroAssembler: public Assembler {
void Move(Register dst, const Immediate& x);
void Move(const Operand& dst, const Immediate& x);
- // Move an immediate into an XMM register.
- void Move(XMMRegister dst, double val);
-
// Push a handle value.
void Push(Handle<Object> handle) { push(Immediate(handle)); }
void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); }
@@ -827,6 +799,9 @@ class MacroAssembler: public Assembler {
return code_object_;
}
+ // Insert code to verify that the x87 stack has the specified depth (0-7)
+ void VerifyX87StackDepth(uint32_t depth);
+
// Emit code for a truncating division by a constant. The dividend register is
// unchanged, the result is in edx, and eax gets clobbered.
void TruncatingDiv(Register dividend, int32_t divisor);
@@ -963,7 +938,7 @@ class MacroAssembler: public Assembler {
const CallWrapper& call_wrapper = NullCallWrapper());
void EnterExitFramePrologue();
- void EnterExitFrameEpilogue(int argc, bool save_doubles);
+ void EnterExitFrameEpilogue(int argc);
void LeaveExitFrameEpilogue(bool restore_context);
@@ -1089,4 +1064,4 @@ extern void LogGeneratedCodeCoverage(const char* file_line);
} } // namespace v8::internal
-#endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
+#endif // V8_X87_MACRO_ASSEMBLER_X87_H_
« no previous file with comments | « src/x87/lithium-x87.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698