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

Unified Diff: src/x64/assembler-x64.h

Issue 300004: X64 Win64: Reimplement fmod so that it works. (Closed)
Patch Set: And it lints. Created 11 years, 2 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
Index: src/x64/assembler-x64.h
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
index 7e09a416b562737bc8c75bd912856a0c7799f7ab..76d2a8dd1ba4da558c346790da3b73c7f3db657a 100644
--- a/src/x64/assembler-x64.h
+++ b/src/x64/assembler-x64.h
@@ -283,6 +283,25 @@ inline Hint NegateHint(Hint hint) {
}
+// FPU status word bits
+
+enum FPUStatus {
+ kInvalidOperandException = 0x01,
+ kDenormalizedOperandException = 0x02,
+ kZeroDivideException = 0x04,
+ kOverflowException = 0x08,
+ kUnderflowException = 0x10,
+ kPrecisionException = 0x20,
+ kAnyExceptionMask = 0x3f, // All of the above.
+ kStackFault = 0x40,
+ kErrorSummary = 0x80,
+ kCondition0 = 0x100,
+ kCondition1 = 0x200,
+ kCondition2 = 0x400,
+ kCondition3 = 0x4000
+};
+
+
// -----------------------------------------------------------------------------
// Machine instruction Immediates
@@ -327,12 +346,14 @@ class Operand BASE_EMBEDDED {
ScaleFactor scale,
int32_t disp);
+ // New operand based on previous operand and a fixed displacement.
+ Operand(const Operand& base, int32_t displacement);
+
private:
byte rex_;
byte buf_[10];
// The number of bytes in buf_.
unsigned int len_;
- RelocInfo::Mode rmode_;
// Set the ModR/M byte without an encoded 'reg' register. The
// register is encoded later as part of the emit_operand operation.
@@ -932,6 +953,10 @@ class Assembler : public Malloced {
immediate_arithmetic_op(0x6, dst, src);
}
+ void xorl(Register dst, Immediate src) {
+ immediate_arithmetic_op_32(0x6, dst, src);
+ }
+
void xor_(const Operand& dst, Immediate src) {
immediate_arithmetic_op(0x6, dst, src);
}
@@ -1006,6 +1031,9 @@ class Assembler : public Malloced {
void fstp_s(const Operand& adr);
void fstp_d(const Operand& adr);
+ void fst_d(const Operand& adr);
+ void fstp(int stack_slot);
+ void fst(int stack_slot);
void fild_s(const Operand& adr);
void fild_d(const Operand& adr);
@@ -1040,12 +1068,14 @@ class Assembler : public Malloced {
void ffree(int i = 0);
void ftst();
+ void fucom(int i);
void fucomp(int i);
void fucompp();
void fcompp();
void fnstsw_ax();
void fwait();
void fnclex();
+ void fxam();
void fsin();
void fcos();

Powered by Google App Engine
This is Rietveld 408576698