OLD | NEW |
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); } | 281 bool is_zero() const { return x_ == 0 && RelocInfo::IsNone(rmode_); } |
282 bool is_int8() const { | 282 bool is_int8() const { |
283 return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_); | 283 return -128 <= x_ && x_ < 128 && RelocInfo::IsNone(rmode_); |
284 } | 284 } |
285 bool is_uint8() const { | 285 bool is_uint8() const { |
286 return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_); | 286 return v8::internal::is_uint8(x_) && RelocInfo::IsNone(rmode_); |
287 } | 287 } |
288 bool is_int16() const { | 288 bool is_int16() const { |
289 return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_); | 289 return -32768 <= x_ && x_ < 32768 && RelocInfo::IsNone(rmode_); |
290 } | 290 } |
| 291 bool is_uint16() const { |
| 292 return v8::internal::is_uint16(x_) && RelocInfo::IsNone(rmode_); |
| 293 } |
291 | 294 |
292 private: | 295 private: |
293 inline explicit Immediate(Label* value); | 296 inline explicit Immediate(Label* value); |
294 | 297 |
295 int x_; | 298 int x_; |
296 RelocInfo::Mode rmode_; | 299 RelocInfo::Mode rmode_; |
297 | 300 |
298 friend class Operand; | 301 friend class Operand; |
299 friend class Assembler; | 302 friend class Assembler; |
300 friend class MacroAssembler; | 303 friend class MacroAssembler; |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 760 |
758 void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); } | 761 void sub(Register dst, const Immediate& imm) { sub(Operand(dst), imm); } |
759 void sub(const Operand& dst, const Immediate& x); | 762 void sub(const Operand& dst, const Immediate& x); |
760 void sub(Register dst, Register src) { sub(dst, Operand(src)); } | 763 void sub(Register dst, Register src) { sub(dst, Operand(src)); } |
761 void sub(Register dst, const Operand& src); | 764 void sub(Register dst, const Operand& src); |
762 void sub(const Operand& dst, Register src); | 765 void sub(const Operand& dst, Register src); |
763 | 766 |
764 void test(Register reg, const Immediate& imm); | 767 void test(Register reg, const Immediate& imm); |
765 void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); } | 768 void test(Register reg0, Register reg1) { test(reg0, Operand(reg1)); } |
766 void test(Register reg, const Operand& op); | 769 void test(Register reg, const Operand& op); |
| 770 void test(const Operand& op, const Immediate& imm); |
| 771 void test(const Operand& op, Register reg) { test(reg, op); } |
767 void test_b(Register reg, const Operand& op); | 772 void test_b(Register reg, const Operand& op); |
768 void test(const Operand& op, const Immediate& imm); | |
769 void test_b(Register reg, Immediate imm8); | 773 void test_b(Register reg, Immediate imm8); |
770 void test_b(const Operand& op, Immediate imm8); | 774 void test_b(const Operand& op, Immediate imm8); |
| 775 void test_b(const Operand& op, Register reg) { test_b(reg, op); } |
| 776 void test_b(Register dst, Register src) { test_b(dst, Operand(src)); } |
| 777 void test_w(Register reg, const Operand& op); |
| 778 void test_w(Register reg, Immediate imm16); |
| 779 void test_w(const Operand& op, Immediate imm16); |
| 780 void test_w(const Operand& op, Register reg) { test_w(reg, op); } |
| 781 void test_w(Register dst, Register src) { test_w(dst, Operand(src)); } |
771 | 782 |
772 void xor_(Register dst, int32_t imm32); | 783 void xor_(Register dst, int32_t imm32); |
773 void xor_(Register dst, Register src) { xor_(dst, Operand(src)); } | 784 void xor_(Register dst, Register src) { xor_(dst, Operand(src)); } |
774 void xor_(Register dst, const Operand& src); | 785 void xor_(Register dst, const Operand& src); |
775 void xor_(const Operand& dst, Register src); | 786 void xor_(const Operand& dst, Register src); |
776 void xor_(Register dst, const Immediate& imm) { xor_(Operand(dst), imm); } | 787 void xor_(Register dst, const Immediate& imm) { xor_(Operand(dst), imm); } |
777 void xor_(const Operand& dst, const Immediate& x); | 788 void xor_(const Operand& dst, const Immediate& x); |
778 | 789 |
779 // Bit operations. | 790 // Bit operations. |
780 void bt(const Operand& dst, Register src); | 791 void bt(const Operand& dst, Register src); |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 Assembler* assembler_; | 1099 Assembler* assembler_; |
1089 #ifdef DEBUG | 1100 #ifdef DEBUG |
1090 int space_before_; | 1101 int space_before_; |
1091 #endif | 1102 #endif |
1092 }; | 1103 }; |
1093 | 1104 |
1094 } // namespace internal | 1105 } // namespace internal |
1095 } // namespace v8 | 1106 } // namespace v8 |
1096 | 1107 |
1097 #endif // V8_X87_ASSEMBLER_X87_H_ | 1108 #endif // V8_X87_ASSEMBLER_X87_H_ |
OLD | NEW |