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 575 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 | |
608 bool OffsetIsVFPEncodable() const { | |
609 return offset_ % 4 == 0 && offset_ < 1024 && offset_ > -1024; | |
Søren Thygesen Gjesse
2011/01/25 08:33:20
is_unit8(offset_ >= 0 ? offset_ >> 2 : (-offset_)
| |
610 } | |
611 | |
604 private: | 612 private: |
605 Register rn_; // base | 613 Register rn_; // base |
606 Register rm_; // register offset | 614 Register rm_; // register offset |
607 int32_t offset_; // valid if rm_ == no_reg | 615 int32_t offset_; // valid if rm_ == no_reg |
608 ShiftOp shift_op_; | 616 ShiftOp shift_op_; |
609 int shift_imm_; // valid if rm_ != no_reg && rs_ == no_reg | 617 int shift_imm_; // valid if rm_ != no_reg && rs_ == no_reg |
610 AddrMode am_; // bits P, U, and W | 618 AddrMode am_; // bits P, U, and W |
611 | 619 |
612 friend class Assembler; | 620 friend class Assembler; |
613 }; | 621 }; |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1058 // Support for VFP. | 1066 // Support for VFP. |
1059 // All these APIs support S0 to S31 and D0 to D15. | 1067 // 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. | 1068 // Currently these APIs do not support extended D registers, i.e, D16 to D31. |
1061 // However, some simple modifications can allow | 1069 // However, some simple modifications can allow |
1062 // these APIs to support D16 to D31. | 1070 // these APIs to support D16 to D31. |
1063 | 1071 |
1064 void vldr(const DwVfpRegister dst, | 1072 void vldr(const DwVfpRegister dst, |
1065 const Register base, | 1073 const Register base, |
1066 int offset, // Offset must be a multiple of 4. | 1074 int offset, // Offset must be a multiple of 4. |
1067 const Condition cond = al); | 1075 const Condition cond = al); |
1076 void vldr(const DwVfpRegister dst, | |
1077 const MemOperand& src, // Source cannot be a FieldOperand. | |
Søren Thygesen Gjesse
2011/01/25 08:33:20
I think the comments "Offset must be a multiple of
William Hesse
2011/01/25 17:25:13
Comments are removed. These functions now work wi
| |
1078 const Condition cond = al); | |
1068 | 1079 |
1069 void vldr(const SwVfpRegister dst, | 1080 void vldr(const SwVfpRegister dst, |
1070 const Register base, | 1081 const Register base, |
1071 int offset, // Offset must be a multiple of 4. | 1082 int offset, // Offset must be a multiple of 4. |
1072 const Condition cond = al); | 1083 const Condition cond = al); |
1084 void vldr(const SwVfpRegister dst, | |
1085 const MemOperand& src, // Source cannot be a FieldOperand. | |
1086 const Condition cond = al); | |
1073 | 1087 |
1074 void vstr(const DwVfpRegister src, | 1088 void vstr(const DwVfpRegister src, |
1075 const Register base, | 1089 const Register base, |
1076 int offset, // Offset must be a multiple of 4. | 1090 int offset, // Offset must be a multiple of 4. |
1077 const Condition cond = al); | 1091 const Condition cond = al); |
1092 void vstr(const DwVfpRegister src, | |
1093 const MemOperand& dst, // Destination cannot be a FieldOperand. | |
1094 const Condition cond = al); | |
1078 | 1095 |
1079 void vstr(const SwVfpRegister src, | 1096 void vstr(const SwVfpRegister src, |
1080 const Register base, | 1097 const Register base, |
1081 int offset, // Offset must be a multiple of 4. | 1098 int offset, // Offset must be a multiple of 4. |
1082 const Condition cond = al); | 1099 const Condition cond = al); |
1100 void vstr(const SwVfpRegister src, | |
1101 const MemOperand& dst, // Destination cannot be a FieldOperand. | |
1102 const Condition cond = al); | |
1083 | 1103 |
1084 void vmov(const DwVfpRegister dst, | 1104 void vmov(const DwVfpRegister dst, |
1085 double imm, | 1105 double imm, |
1086 const Condition cond = al); | 1106 const Condition cond = al); |
1087 void vmov(const SwVfpRegister dst, | 1107 void vmov(const SwVfpRegister dst, |
1088 const SwVfpRegister src, | 1108 const SwVfpRegister src, |
1089 const Condition cond = al); | 1109 const Condition cond = al); |
1090 void vmov(const DwVfpRegister dst, | 1110 void vmov(const DwVfpRegister dst, |
1091 const DwVfpRegister src, | 1111 const DwVfpRegister src, |
1092 const Condition cond = al); | 1112 const Condition cond = al); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1422 public: | 1442 public: |
1423 explicit EnsureSpace(Assembler* assembler) { | 1443 explicit EnsureSpace(Assembler* assembler) { |
1424 assembler->CheckBuffer(); | 1444 assembler->CheckBuffer(); |
1425 } | 1445 } |
1426 }; | 1446 }; |
1427 | 1447 |
1428 | 1448 |
1429 } } // namespace v8::internal | 1449 } } // namespace v8::internal |
1430 | 1450 |
1431 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1451 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |