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

Unified Diff: src/assembler_ia32.h

Issue 595093002: Handle "inplace" ops and unary ops w/ assembler (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: format 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
« no previous file with comments | « src/IceRegistersX8632.h ('k') | src/assembler_ia32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler_ia32.h
diff --git a/src/assembler_ia32.h b/src/assembler_ia32.h
index 6192e91de9a7e55a1a66a6a4bd39f7d3713474cf..b5c9a16097649bce33c2e9aab68026c802631109 100644
--- a/src/assembler_ia32.h
+++ b/src/assembler_ia32.h
@@ -336,13 +336,32 @@ public:
static const bool kNearJump = true;
static const bool kFarJump = false;
+ // Operations to emit GPR instructions (and dispatch on operand type).
+ typedef void (AssemblerX86::*TypedEmitGPR)(Type, GPRRegister);
+ typedef void (AssemblerX86::*TypedEmitAddr)(Type, const Address &);
+ struct GPREmitterOneOp {
+ TypedEmitGPR Reg;
+ TypedEmitAddr Addr;
+ };
+
+ typedef void (AssemblerX86::*TypedEmitGPRGPR)(Type, GPRRegister, GPRRegister);
+ typedef void (AssemblerX86::*TypedEmitGPRAddr)(Type, GPRRegister,
+ const Address &);
+ typedef void (AssemblerX86::*TypedEmitGPRImm)(Type, GPRRegister,
+ const Immediate &);
+ struct GPREmitterRegOp {
+ TypedEmitGPRGPR GPRGPR;
+ TypedEmitGPRAddr GPRAddr;
+ TypedEmitGPRImm GPRImm;
+ };
+
// Operations to emit XMM instructions (and dispatch on operand type).
typedef void (AssemblerX86::*TypedEmitXmmXmm)(Type, XmmRegister, XmmRegister);
typedef void (AssemblerX86::*TypedEmitXmmAddr)(Type, XmmRegister,
const Address &);
typedef void (AssemblerX86::*TypedEmitAddrXmm)(Type, const Address &,
XmmRegister);
- struct TypedXmmEmitters {
+ struct XmmEmitterTwoOps {
TypedEmitXmmXmm XmmXmm;
TypedEmitXmmAddr XmmAddr;
TypedEmitAddrXmm AddrXmm;
@@ -393,7 +412,7 @@ public:
void movw(GPRRegister dst, const Address &src);
void movw(const Address &dst, GPRRegister src);
- void leal(GPRRegister dst, const Address &src);
+ void lea(Type Ty, GPRRegister dst, const Address &src);
void cmov(CondX86::BrCond cond, GPRRegister dst, GPRRegister src);
@@ -404,7 +423,9 @@ public:
void movss(XmmRegister dst, XmmRegister src);
void movd(XmmRegister dst, GPRRegister src);
+ void movd(XmmRegister dst, const Address &src);
void movd(GPRRegister dst, XmmRegister src);
+ void movd(const Address &dst, XmmRegister src);
void movq(const Address &dst, XmmRegister src);
void movq(XmmRegister dst, const Address &src);
@@ -622,10 +643,16 @@ public:
void shrd(GPRRegister dst, GPRRegister src, const Immediate &imm);
void shrd(const Address &dst, GPRRegister src);
- void negl(GPRRegister reg);
+ void neg(Type Ty, GPRRegister reg);
+ void neg(Type Ty, const Address &addr);
void notl(GPRRegister reg);
- void bsrl(GPRRegister dst, GPRRegister src);
+ void bsf(Type Ty, GPRRegister dst, GPRRegister src);
+ void bsf(Type Ty, GPRRegister dst, const Address &src);
+ void bsr(Type Ty, GPRRegister dst, GPRRegister src);
+ void bsr(Type Ty, GPRRegister dst, const Address &src);
+
+ void bswap(Type Ty, GPRRegister reg);
void bt(GPRRegister base, GPRRegister offset);
« no previous file with comments | « src/IceRegistersX8632.h ('k') | src/assembler_ia32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698