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

Unified Diff: runtime/vm/assembler_mips.h

Issue 15144004: Implements int to double conversion instructions for MIPS simulator, assembler, disassembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | runtime/vm/assembler_mips_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.h
===================================================================
--- runtime/vm/assembler_mips.h (revision 22752)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -441,6 +441,19 @@
EmitRType(SPECIAL2, rs, rd, rd, 0, CLZ);
}
+ // Converts a 32-bit signed int in fs to a double in fd.
+ void cvtdw(FRegister fd, FRegister fs) {
+ ASSERT(EvenFPURegister(fd));
+ EmitFpuRType(COP1, FMT_W, F0, fs, fd, COP1_CVT_D);
+ }
+
+ // Converts a 64-bit signed int in fs to a double in fd.
+ void cvtdl(FRegister fd, FRegister fs) {
+ ASSERT(EvenFPURegister(fs));
+ ASSERT(EvenFPURegister(fd));
+ EmitFpuRType(COP1, FMT_L, F0, fs, fd, COP1_CVT_D);
+ }
+
void div(Register rs, Register rt) {
EmitRType(SPECIAL, rs, rt, R0, 0, DIV);
}
« no previous file with comments | « no previous file | runtime/vm/assembler_mips_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698