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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 // rm <shift_op> shift_imm | 412 // rm <shift_op> shift_imm |
413 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); | 413 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); |
414 | 414 |
415 // rm <shift_op> rs | 415 // rm <shift_op> rs |
416 explicit Operand(Register rm, ShiftOp shift_op, Register rs); | 416 explicit Operand(Register rm, ShiftOp shift_op, Register rs); |
417 | 417 |
418 // Return true if this is a register operand. | 418 // Return true if this is a register operand. |
419 INLINE(bool is_reg() const); | 419 INLINE(bool is_reg() const); |
420 | 420 |
| 421 // Return true of this operand fits in one instruction so that no |
| 422 // 2-instruction solution with a load into the ip register is necessary. |
| 423 bool is_single_instruction() const; |
| 424 |
| 425 inline int32_t immediate() const { |
| 426 ASSERT(!rm_.is_valid()); |
| 427 return imm32_; |
| 428 } |
| 429 |
421 Register rm() const { return rm_; } | 430 Register rm() const { return rm_; } |
422 | 431 |
423 private: | 432 private: |
424 Register rm_; | 433 Register rm_; |
425 Register rs_; | 434 Register rs_; |
426 ShiftOp shift_op_; | 435 ShiftOp shift_op_; |
427 int shift_imm_; // valid if rm_ != no_reg && rs_ == no_reg | 436 int shift_imm_; // valid if rm_ != no_reg && rs_ == no_reg |
428 int32_t imm32_; // valid if rm_ == no_reg | 437 int32_t imm32_; // valid if rm_ == no_reg |
429 RelocInfo::Mode rmode_; | 438 RelocInfo::Mode rmode_; |
430 | 439 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 534 |
526 typedef int32_t Instr; | 535 typedef int32_t Instr; |
527 | 536 |
528 | 537 |
529 extern const Instr kMovLrPc; | 538 extern const Instr kMovLrPc; |
530 extern const Instr kLdrPCMask; | 539 extern const Instr kLdrPCMask; |
531 extern const Instr kLdrPCPattern; | 540 extern const Instr kLdrPCPattern; |
532 extern const Instr kBlxRegMask; | 541 extern const Instr kBlxRegMask; |
533 extern const Instr kBlxRegPattern; | 542 extern const Instr kBlxRegPattern; |
534 | 543 |
| 544 extern const Instr kMovMvnMask; |
| 545 extern const Instr kMovMvnPattern; |
| 546 extern const Instr kMovMvnFlip; |
| 547 |
| 548 extern const Instr kCmpCmnMask; |
| 549 extern const Instr kCmpCmnPattern; |
| 550 extern const Instr kCmpCmnFlip; |
| 551 |
| 552 extern const Instr kALUMask; |
| 553 extern const Instr kAddPattern; |
| 554 extern const Instr kSubPattern; |
| 555 extern const Instr kAndPattern; |
| 556 extern const Instr kBicPattern; |
| 557 extern const Instr kAddSubFlip; |
| 558 extern const Instr kAndBicFlip; |
535 | 559 |
536 class Assembler : public Malloced { | 560 class Assembler : public Malloced { |
537 public: | 561 public: |
538 // Create an assembler. Instructions and relocation information are emitted | 562 // Create an assembler. Instructions and relocation information are emitted |
539 // into a buffer, with the instructions starting from the beginning and the | 563 // into a buffer, with the instructions starting from the beginning and the |
540 // relocation information starting from the end of the buffer. See CodeDesc | 564 // relocation information starting from the end of the buffer. See CodeDesc |
541 // for a detailed comment on the layout (globals.h). | 565 // for a detailed comment on the layout (globals.h). |
542 // | 566 // |
543 // If the provided buffer is NULL, the assembler allocates and grows its own | 567 // If the provided buffer is NULL, the assembler allocates and grows its own |
544 // buffer, and buffer_size determines the initial buffer size. The buffer is | 568 // buffer, and buffer_size determines the initial buffer size. The buffer is |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1171 | 1195 |
1172 friend class RegExpMacroAssemblerARM; | 1196 friend class RegExpMacroAssemblerARM; |
1173 friend class RelocInfo; | 1197 friend class RelocInfo; |
1174 friend class CodePatcher; | 1198 friend class CodePatcher; |
1175 friend class BlockConstPoolScope; | 1199 friend class BlockConstPoolScope; |
1176 }; | 1200 }; |
1177 | 1201 |
1178 } } // namespace v8::internal | 1202 } } // namespace v8::internal |
1179 | 1203 |
1180 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1204 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |