| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 534 |
| 535 // rm <shift_op> shift_imm | 535 // rm <shift_op> shift_imm |
| 536 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); | 536 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); |
| 537 | 537 |
| 538 // rm <shift_op> rs | 538 // rm <shift_op> rs |
| 539 explicit Operand(Register rm, ShiftOp shift_op, Register rs); | 539 explicit Operand(Register rm, ShiftOp shift_op, Register rs); |
| 540 | 540 |
| 541 // Return true if this is a register operand. | 541 // Return true if this is a register operand. |
| 542 INLINE(bool is_reg() const); | 542 INLINE(bool is_reg() const); |
| 543 | 543 |
| 544 // Return true of this operand fits in one instruction so that no | 544 // Return true if this operand fits in one instruction so that no |
| 545 // 2-instruction solution with a load into the ip register is necessary. | 545 // 2-instruction solution with a load into the ip register is necessary. |
| 546 bool is_single_instruction() const; | 546 bool is_single_instruction() const; |
| 547 bool must_use_constant_pool() const; | 547 bool must_use_constant_pool() const; |
| 548 | 548 |
| 549 inline int32_t immediate() const { | 549 inline int32_t immediate() const { |
| 550 ASSERT(!rm_.is_valid()); | 550 ASSERT(!rm_.is_valid()); |
| 551 return imm32_; | 551 return imm32_; |
| 552 } | 552 } |
| 553 | 553 |
| 554 Register rm() const { return rm_; } | 554 Register rm() const { return rm_; } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 // [rn +/- rm <shift_op> shift_imm]! PreIndex/NegPreIndex | 586 // [rn +/- rm <shift_op> shift_imm]! PreIndex/NegPreIndex |
| 587 // [rn], +/- rm <shift_op> shift_imm PostIndex/NegPostIndex | 587 // [rn], +/- rm <shift_op> shift_imm PostIndex/NegPostIndex |
| 588 explicit MemOperand(Register rn, Register rm, | 588 explicit MemOperand(Register rn, Register rm, |
| 589 ShiftOp shift_op, int shift_imm, AddrMode am = Offset); | 589 ShiftOp shift_op, int shift_imm, AddrMode am = Offset); |
| 590 | 590 |
| 591 void set_offset(int32_t offset) { | 591 void set_offset(int32_t offset) { |
| 592 ASSERT(rm_.is(no_reg)); | 592 ASSERT(rm_.is(no_reg)); |
| 593 offset_ = offset; | 593 offset_ = offset; |
| 594 } | 594 } |
| 595 | 595 |
| 596 uint32_t offset() { | 596 uint32_t offset() const { |
| 597 ASSERT(rm_.is(no_reg)); | 597 ASSERT(rm_.is(no_reg)); |
| 598 return offset_; | 598 return offset_; |
| 599 } | 599 } |
| 600 | 600 |
| 601 Register rn() const { return rn_; } | 601 Register rn() const { return rn_; } |
| 602 Register rm() const { return rm_; } | 602 Register rm() const { return rm_; } |
| 603 | 603 |
| 604 bool OffsetIsEncodable() const { |
| 605 return offset_ >= 0 ? is_uint12(offset_) : is_uint12(-offset_); |
| 606 } |
| 607 |
| 604 private: | 608 private: |
| 605 Register rn_; // base | 609 Register rn_; // base |
| 606 Register rm_; // register offset | 610 Register rm_; // register offset |
| 607 int32_t offset_; // valid if rm_ == no_reg | 611 int32_t offset_; // valid if rm_ == no_reg |
| 608 ShiftOp shift_op_; | 612 ShiftOp shift_op_; |
| 609 int shift_imm_; // valid if rm_ != no_reg && rs_ == no_reg | 613 int shift_imm_; // valid if rm_ != no_reg && rs_ == no_reg |
| 610 AddrMode am_; // bits P, U, and W | 614 AddrMode am_; // bits P, U, and W |
| 611 | 615 |
| 612 friend class Assembler; | 616 friend class Assembler; |
| 613 }; | 617 }; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1056 LFlag l = Short); // v5 and above | 1060 LFlag l = Short); // v5 and above |
| 1057 | 1061 |
| 1058 // Support for VFP. | 1062 // Support for VFP. |
| 1059 // All these APIs support S0 to S31 and D0 to D15. | 1063 // All these APIs support S0 to S31 and D0 to D15. |
| 1060 // Currently these APIs do not support extended D registers, i.e, D16 to D31. | 1064 // Currently these APIs do not support extended D registers, i.e, D16 to D31. |
| 1061 // However, some simple modifications can allow | 1065 // However, some simple modifications can allow |
| 1062 // these APIs to support D16 to D31. | 1066 // these APIs to support D16 to D31. |
| 1063 | 1067 |
| 1064 void vldr(const DwVfpRegister dst, | 1068 void vldr(const DwVfpRegister dst, |
| 1065 const Register base, | 1069 const Register base, |
| 1066 int offset, // Offset must be a multiple of 4. | 1070 int offset, |
| 1071 const Condition cond = al); |
| 1072 void vldr(const DwVfpRegister dst, |
| 1073 const MemOperand& src, |
| 1067 const Condition cond = al); | 1074 const Condition cond = al); |
| 1068 | 1075 |
| 1069 void vldr(const SwVfpRegister dst, | 1076 void vldr(const SwVfpRegister dst, |
| 1070 const Register base, | 1077 const Register base, |
| 1071 int offset, // Offset must be a multiple of 4. | 1078 int offset, |
| 1079 const Condition cond = al); |
| 1080 void vldr(const SwVfpRegister dst, |
| 1081 const MemOperand& src, |
| 1072 const Condition cond = al); | 1082 const Condition cond = al); |
| 1073 | 1083 |
| 1074 void vstr(const DwVfpRegister src, | 1084 void vstr(const DwVfpRegister src, |
| 1075 const Register base, | 1085 const Register base, |
| 1076 int offset, // Offset must be a multiple of 4. | 1086 int offset, |
| 1087 const Condition cond = al); |
| 1088 void vstr(const DwVfpRegister src, |
| 1089 const MemOperand& dst, |
| 1077 const Condition cond = al); | 1090 const Condition cond = al); |
| 1078 | 1091 |
| 1079 void vstr(const SwVfpRegister src, | 1092 void vstr(const SwVfpRegister src, |
| 1080 const Register base, | 1093 const Register base, |
| 1081 int offset, // Offset must be a multiple of 4. | 1094 int offset, |
| 1095 const Condition cond = al); |
| 1096 void vstr(const SwVfpRegister src, |
| 1097 const MemOperand& dst, |
| 1082 const Condition cond = al); | 1098 const Condition cond = al); |
| 1083 | 1099 |
| 1084 void vmov(const DwVfpRegister dst, | 1100 void vmov(const DwVfpRegister dst, |
| 1085 double imm, | 1101 double imm, |
| 1086 const Condition cond = al); | 1102 const Condition cond = al); |
| 1087 void vmov(const SwVfpRegister dst, | 1103 void vmov(const SwVfpRegister dst, |
| 1088 const SwVfpRegister src, | 1104 const SwVfpRegister src, |
| 1089 const Condition cond = al); | 1105 const Condition cond = al); |
| 1090 void vmov(const DwVfpRegister dst, | 1106 void vmov(const DwVfpRegister dst, |
| 1091 const DwVfpRegister src, | 1107 const DwVfpRegister src, |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 public: | 1438 public: |
| 1423 explicit EnsureSpace(Assembler* assembler) { | 1439 explicit EnsureSpace(Assembler* assembler) { |
| 1424 assembler->CheckBuffer(); | 1440 assembler->CheckBuffer(); |
| 1425 } | 1441 } |
| 1426 }; | 1442 }; |
| 1427 | 1443 |
| 1428 | 1444 |
| 1429 } } // namespace v8::internal | 1445 } } // namespace v8::internal |
| 1430 | 1446 |
| 1431 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1447 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |