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

Unified Diff: src/IceAssemblerMIPS32.h

Issue 2341713003: Subzero, MIPS32: Floating point support in ELF output (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/IceAssemblerMIPS32.cpp » ('j') | src/IceAssemblerMIPS32.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerMIPS32.h
diff --git a/src/IceAssemblerMIPS32.h b/src/IceAssemblerMIPS32.h
index eefb1b2004e7f0e55c73013bba50967dd4b17d15..8ce8d94f9b9f4a2a4c881c835cade1098dcb5547 100644
--- a/src/IceAssemblerMIPS32.h
+++ b/src/IceAssemblerMIPS32.h
@@ -27,6 +27,13 @@ namespace MIPS32 {
using IValueT = uint32_t;
using IOffsetT = int32_t;
+enum FPInstDataFormat {
+ SinglePrecision = 16,
+ DoublePrecision = 17,
+ Word = 20,
+ Long = 21
+};
+
class AssemblerMIPS32 : public Assembler {
AssemblerMIPS32(const AssemblerMIPS32 &) = delete;
AssemblerMIPS32 &operator=(const AssemblerMIPS32 &) = delete;
@@ -56,15 +63,38 @@ public:
void emitRtRsImm16(IValueT Opcode, const Operand *OpRt, const Operand *OpRs,
const uint32_t Imm, const char *InsnName);
Jim Stichnoth 2016/09/15 04:53:45 "const uint32_t" is kind of odd as a function argu
obucinac 2016/09/15 13:35:06 I dont have the opinion on this, I was just follow
+ void emitFtRsImm16(IValueT Opcode, const Operand *OpFt, const Operand *OpRs,
+ const uint32_t Imm, const char *InsnName);
+
void emitRdRtSa(IValueT Opcode, const Operand *OpRd, const Operand *OpRt,
const uint32_t Sa, const char *InsnName);
void emitRdRsRt(IValueT Opcode, const Operand *OpRd, const Operand *OpRs,
const Operand *OpRt, const char *InsnName);
+ void emitFPFormatFtFsFd(IValueT Opcode, FPInstDataFormat Format,
+ const Operand *OpFd, const Operand *OpFs,
+ const Operand *OpFt, const char *InsnName);
+
void emitBr(const CondMIPS32::Cond Cond, const Operand *OpRs,
const Operand *OpRt, IOffsetT Offset);
+ void add_d(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void add_s(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void div_d(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void div_s(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void mul_d(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void mul_s(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void sub_d(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
+ void sub_s(const Operand *OpFt, const Operand *OpFs, const Operand *OpFd);
+
void addiu(const Operand *OpRt, const Operand *OpRs, const uint32_t Imm);
void slti(const Operand *OpRt, const Operand *OpRs, const uint32_t Imm);
« no previous file with comments | « no previous file | src/IceAssemblerMIPS32.cpp » ('j') | src/IceAssemblerMIPS32.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698