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

Side by Side Diff: src/ia32/assembler-ia32.h

Issue 1845603002: [ia32] Byte and word memory operands in ia32 cmp/test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); } 280 bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); }
281 bool is_int8() const { 281 bool is_int8() const {
282 return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_); 282 return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_);
283 } 283 }
284 bool is_uint8() const { 284 bool is_uint8() const {
285 return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_); 285 return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_);
286 } 286 }
287 bool is_int16() const { 287 bool is_int16() const {
288 return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_); 288 return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_);
289 } 289 }
290 bool is_uint16() const {
291 return v8::internal::is_uint16(x_) && RelocInfo::IsNone(rmode_);
292 }
290 293
291 private: 294 private:
292 inline explicit Immediate(Label* value); 295 inline explicit Immediate(Label* value);
293 296
294 int x_; 297 int x_;
295 RelocInfo::Mode rmode_; 298 RelocInfo::Mode rmode_;
296 299
297 friend class Operand; 300 friend class Operand;
298 friend class Assembler; 301 friend class Assembler;
299 friend class MacroAssembler; 302 friend class MacroAssembler;
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 767
765 void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); } 768 void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); }
766 void sub(const Operand& dst, const Immediate& x); 769 void sub(const Operand& dst, const Immediate& x);
767 void sub(Register dst, Register src) { sub(dst, Operand(src)); } 770 void sub(Register dst, Register src) { sub(dst, Operand(src)); }
768 void sub(Register dst, const Operand& src); 771 void sub(Register dst, const Operand& src);
769 void sub(const Operand& dst, Register src); 772 void sub(const Operand& dst, Register src);
770 773
771 void test(Register reg, const Immediate& imm); 774 void test(Register reg, const Immediate& imm);
772 void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); } 775 void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); }
773 void test(Register reg, const Operand& op); 776 void test(Register reg, const Operand& op);
777 void test(const Operand& op, const Immediate& imm);
778 void test(const Operand& op, Register reg) { test(reg, op); }
774 void test_b(Register reg, const Operand& op); 779 void test_b(Register reg, const Operand& op);
775 void test(const Operand& op, const Immediate& imm);
776 void test_b(Register reg, Immediate imm8); 780 void test_b(Register reg, Immediate imm8);
777 void test_b(const Operand& op, Immediate imm8); 781 void test_b(const Operand& op, Immediate imm8);
782 void test_b(const Operand& op, Register reg) { test_b(reg, op); }
783 void test_b(Register dst, Register src) { test_b(dst, Operand(src)); }
784 void test_w(Register reg, const Operand& op);
785 void test_w(Register reg, Immediate imm16);
786 void test_w(const Operand& op, Immediate imm16);
787 void test_w(const Operand& op, Register reg) { test_w(reg, op); }
788 void test_w(Register dst, Register src) { test_w(dst, Operand(src)); }
778 789
779 void xor_(Register dst, int32_t imm32); 790 void xor_(Register dst, int32_t imm32);
780 void xor_(Register dst, Register src) { xor_(dst, Operand(src)); } 791 void xor_(Register dst, Register src) { xor_(dst, Operand(src)); }
781 void xor_(Register dst, const Operand& src); 792 void xor_(Register dst, const Operand& src);
782 void xor_(const Operand& dst, Register src); 793 void xor_(const Operand& dst, Register src);
783 void xor_(Register dst, const Immediate& imm) { xor_(Operand(dst), imm); } 794 void xor_(Register dst, const Immediate& imm) { xor_(Operand(dst), imm); }
784 void xor_(const Operand& dst, const Immediate& x); 795 void xor_(const Operand& dst, const Immediate& x);
785 796
786 // Bit operations. 797 // Bit operations.
787 void bt(const Operand& dst, Register src); 798 void bt(const Operand& dst, Register src);
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 Assembler* assembler_; 1593 Assembler* assembler_;
1583 #ifdef DEBUG 1594 #ifdef DEBUG
1584 int space_before_; 1595 int space_before_;
1585 #endif 1596 #endif
1586 }; 1597 };
1587 1598
1588 } // namespace internal 1599 } // namespace internal
1589 } // namespace v8 1600 } // namespace v8
1590 1601
1591 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1602 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698