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

Unified Diff: src/ia32/assembler-ia32.h

Issue 1815213002: Extends testb and cmpb/cmpw instruction support in the ia32 assembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a copy/pasted erroneous DCHECK. Created 4 years, 9 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/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/assembler-ia32.h
diff --git a/src/ia32/assembler-ia32.h b/src/ia32/assembler-ia32.h
index 723a1cd431a684c3eaf8e846b9d8f88a30b54f2c..e3c1802b0837d9cb82ee11da34cf1b95d8c4cfd5 100644
--- a/src/ia32/assembler-ia32.h
+++ b/src/ia32/assembler-ia32.h
@@ -281,6 +281,9 @@ class Immediate BASE_EMBEDDED {
bool is_int8() const {
return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_);
}
+ bool is_uint8() const {
+ return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_);
+ }
bool is_int16() const {
return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_);
}
@@ -667,13 +670,18 @@ class Assembler : public AssemblerBase {
void and_(const Operand& dst, Register src);
void and_(const Operand& dst, const Immediate& x);
- void cmpb(Register reg, int8_t imm8) { cmpb(Operand(reg), imm8); }
- void cmpb(const Operand& op, int8_t imm8);
+ void cmpb(Register reg, Immediate imm8) { cmpb(Operand(reg), imm8); }
+ void cmpb(const Operand& op, Immediate imm8);
void cmpb(Register reg, const Operand& op);
void cmpb(const Operand& op, Register reg);
+ void cmpb(Register dst, Register src) { cmpb(Operand(dst), src); }
void cmpb_al(const Operand& op);
void cmpw_ax(const Operand& op);
- void cmpw(const Operand& op, Immediate imm16);
+ void cmpw(const Operand& dst, Immediate src);
+ void cmpw(Register dst, Immediate src) { cmpw(Operand(dst), src); }
+ void cmpw(Register dst, const Operand& src);
+ void cmpw(Register dst, Register src) { cmpw(Operand(dst), src); }
+ void cmpw(const Operand& dst, Register src);
void cmp(Register reg, int32_t imm32);
void cmp(Register reg, Handle<Object> handle);
void cmp(Register reg0, Register reg1) { cmp(reg0, Operand(reg1)); }
@@ -765,8 +773,8 @@ class Assembler : public AssemblerBase {
void test(Register reg, const Operand& op);
void test_b(Register reg, const Operand& op);
void test(const Operand& op, const Immediate& imm);
- void test_b(Register reg, uint8_t imm8);
- void test_b(const Operand& op, uint8_t imm8);
+ void test_b(Register reg, Immediate imm8);
+ void test_b(const Operand& op, Immediate imm8);
void xor_(Register dst, int32_t imm32);
void xor_(Register dst, Register src) { xor_(dst, Operand(src)); }
@@ -1484,6 +1492,7 @@ class Assembler : public AssemblerBase {
RelocInfo::Mode rmode,
TypeFeedbackId id = TypeFeedbackId::None());
inline void emit(const Immediate& x);
+ inline void emit_b(Immediate x);
inline void emit_w(const Immediate& x);
inline void emit_q(uint64_t x);
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698