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

Unified Diff: src/IceAssemblerX8632.h

Issue 1186713010: Subzero: Add more kinds of RMW lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Refactor the assembler for 8 integer arithmetic instructions Created 5 years, 6 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/IceAssemblerX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerX8632.h
diff --git a/src/IceAssemblerX8632.h b/src/IceAssemblerX8632.h
index 346000d1c911fe474865c5bacfe788b9cb455b37..9d8c042d4ad52f9c72eb92ddbfcdcbd87a3af469 100644
--- a/src/IceAssemblerX8632.h
+++ b/src/IceAssemblerX8632.h
@@ -708,14 +708,20 @@ public:
void And(Type Ty, GPRRegister dst, GPRRegister src);
void And(Type Ty, GPRRegister dst, const Address &address);
void And(Type Ty, GPRRegister dst, const Immediate &imm);
+ void And(Type Ty, const Address &address, GPRRegister reg);
+ void And(Type Ty, const Address &address, const Immediate &imm);
void Or(Type Ty, GPRRegister dst, GPRRegister src);
void Or(Type Ty, GPRRegister dst, const Address &address);
void Or(Type Ty, GPRRegister dst, const Immediate &imm);
+ void Or(Type Ty, const Address &address, GPRRegister reg);
+ void Or(Type Ty, const Address &address, const Immediate &imm);
void Xor(Type Ty, GPRRegister dst, GPRRegister src);
void Xor(Type Ty, GPRRegister dst, const Address &address);
void Xor(Type Ty, GPRRegister dst, const Immediate &imm);
+ void Xor(Type Ty, const Address &address, GPRRegister reg);
+ void Xor(Type Ty, const Address &address, const Immediate &imm);
void add(Type Ty, GPRRegister dst, GPRRegister src);
void add(Type Ty, GPRRegister reg, const Address &address);
@@ -726,14 +732,20 @@ public:
void adc(Type Ty, GPRRegister dst, GPRRegister src);
void adc(Type Ty, GPRRegister dst, const Address &address);
void adc(Type Ty, GPRRegister reg, const Immediate &imm);
+ void adc(Type Ty, const Address &address, GPRRegister reg);
+ void adc(Type Ty, const Address &address, const Immediate &imm);
void sub(Type Ty, GPRRegister dst, GPRRegister src);
void sub(Type Ty, GPRRegister reg, const Address &address);
void sub(Type Ty, GPRRegister reg, const Immediate &imm);
+ void sub(Type Ty, const Address &address, GPRRegister reg);
+ void sub(Type Ty, const Address &address, const Immediate &imm);
void sbb(Type Ty, GPRRegister dst, GPRRegister src);
void sbb(Type Ty, GPRRegister reg, const Address &address);
void sbb(Type Ty, GPRRegister reg, const Immediate &imm);
+ void sbb(Type Ty, const Address &address, GPRRegister reg);
+ void sbb(Type Ty, const Address &address, const Immediate &imm);
void cbw();
void cwd();
@@ -859,6 +871,24 @@ private:
LabelVector LocalLabels;
Label *GetOrCreateLabel(SizeT Number, LabelVector &Labels);
+
+ // The arith_int() methods factor out the commonality between the encodings of
+ // add(), Or(), adc(), sbb(), And(), sub(), Xor(), and cmp(). The Tag
+ // parameter is statically asserted to be less than 8.
+ template <uint32_t Tag>
+ void arith_int(Type Ty, GPRRegister reg, const Immediate &imm);
+
+ template <uint32_t Tag>
+ void arith_int(Type Ty, GPRRegister reg0, GPRRegister reg1);
+
+ template <uint32_t Tag>
+ void arith_int(Type Ty, GPRRegister reg, const Address &address);
+
+ template <uint32_t Tag>
+ void arith_int(Type Ty, const Address &address, GPRRegister reg);
+
+ template <uint32_t Tag>
+ void arith_int(Type Ty, const Address &address, const Immediate &imm);
};
inline void AssemblerX8632::emitUint8(uint8_t value) {
« no previous file with comments | « no previous file | src/IceAssemblerX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698