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

Unified Diff: runtime/vm/intrinsifier_mips.cc

Issue 509153003: New bigint implementation in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intrinsifier_mips.cc
===================================================================
--- runtime/vm/intrinsifier_mips.cc (revision 40060)
+++ runtime/vm/intrinsifier_mips.cc (working copy)
@@ -1049,6 +1049,51 @@
}
+void Intrinsifier::Bigint_getNeg(Assembler* assembler) {
+ __ lw(V0, Address(SP, 0 * kWordSize));
+ __ Ret();
+ __ delay_slot()->lw(V0, FieldAddress(V0, Bigint::neg_offset()));
+}
+
+
+void Intrinsifier::Bigint_setNeg(Assembler* assembler) {
+ __ lw(T0, Address(SP, 0 * kWordSize));
+ __ lw(T1, Address(SP, 1 * kWordSize));
+ __ StoreIntoObject(T1, FieldAddress(T1, Bigint::neg_offset()), T0, false);
+ __ Ret();
+}
+
+
+void Intrinsifier::Bigint_getUsed(Assembler* assembler) {
+ __ lw(V0, Address(SP, 0 * kWordSize));
+ __ Ret();
+ __ delay_slot()->lw(V0, FieldAddress(V0, Bigint::used_offset()));
+}
+
+
+void Intrinsifier::Bigint_setUsed(Assembler* assembler) {
+ __ lw(T0, Address(SP, 0 * kWordSize));
+ __ lw(T1, Address(SP, 1 * kWordSize));
+ __ StoreIntoObject(T1, FieldAddress(T1, Bigint::used_offset()), T0);
+ __ Ret();
+}
+
+
+void Intrinsifier::Bigint_getDigits(Assembler* assembler) {
+ __ lw(V0, Address(SP, 0 * kWordSize));
+ __ Ret();
+ __ delay_slot()->lw(V0, FieldAddress(V0, Bigint::digits_offset()));
+}
+
+
+void Intrinsifier::Bigint_setDigits(Assembler* assembler) {
+ __ lw(T0, Address(SP, 0 * kWordSize));
+ __ lw(T1, Address(SP, 1 * kWordSize));
+ __ StoreIntoObject(T1, FieldAddress(T1, Bigint::digits_offset()), T0, false);
+ __ Ret();
+}
+
+
// Check if the last argument is a double, jump to label 'is_smi' if smi
// (easy to convert to double), otherwise jump to label 'not_double_smi',
// Returns the last argument in T0.

Powered by Google App Engine
This is Rietveld 408576698