| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 | 382 |
| 383 // Coprocessor load/store operand size | 383 // Coprocessor load/store operand size |
| 384 enum LFlag { | 384 enum LFlag { |
| 385 Long = 1 << 22, // long load/store coprocessor | 385 Long = 1 << 22, // long load/store coprocessor |
| 386 Short = 0 << 22 // short load/store coprocessor | 386 Short = 0 << 22 // short load/store coprocessor |
| 387 }; | 387 }; |
| 388 | 388 |
| 389 | 389 |
| 390 // Opcode field of addrmode1 opcodes. |
| 391 enum AddrMode1Opcodes { |
| 392 AND = 0 << 21, |
| 393 EOR = 1 << 21, |
| 394 SUB = 2 << 21, |
| 395 RSB = 3 << 21, |
| 396 ADD = 4 << 21, |
| 397 ADC = 5 << 21, |
| 398 SBC = 6 << 21, |
| 399 RSC = 7 << 21, |
| 400 TST = 8 << 21, |
| 401 TEQ = 9 << 21, |
| 402 CMP = 10 << 21, |
| 403 CMN = 11 << 21, |
| 404 ORR = 12 << 21, |
| 405 MOV = 13 << 21, |
| 406 BIC = 14 << 21, |
| 407 MVN = 15 << 21 |
| 408 }; |
| 409 |
| 390 // ----------------------------------------------------------------------------- | 410 // ----------------------------------------------------------------------------- |
| 391 // Machine instruction Operands | 411 // Machine instruction Operands |
| 392 | 412 |
| 393 // Class Operand represents a shifter operand in data processing instructions | 413 // Class Operand represents a shifter operand in data processing instructions |
| 394 class Operand BASE_EMBEDDED { | 414 class Operand BASE_EMBEDDED { |
| 395 public: | 415 public: |
| 396 // immediate | 416 // immediate |
| 397 INLINE(explicit Operand(int32_t immediate, | 417 INLINE(explicit Operand(int32_t immediate, |
| 398 RelocInfo::Mode rmode = RelocInfo::NONE)); | 418 RelocInfo::Mode rmode = RelocInfo::NONE)); |
| 399 INLINE(explicit Operand(const ExternalReference& f)); | 419 INLINE(explicit Operand(const ExternalReference& f)); |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 void GrowBuffer(); | 1030 void GrowBuffer(); |
| 1011 inline void emit(Instr x); | 1031 inline void emit(Instr x); |
| 1012 | 1032 |
| 1013 // Instruction generation | 1033 // Instruction generation |
| 1014 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); | 1034 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); |
| 1015 void addrmod2(Instr instr, Register rd, const MemOperand& x); | 1035 void addrmod2(Instr instr, Register rd, const MemOperand& x); |
| 1016 void addrmod3(Instr instr, Register rd, const MemOperand& x); | 1036 void addrmod3(Instr instr, Register rd, const MemOperand& x); |
| 1017 void addrmod4(Instr instr, Register rn, RegList rl); | 1037 void addrmod4(Instr instr, Register rn, RegList rl); |
| 1018 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); | 1038 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); |
| 1019 | 1039 |
| 1040 // Used by addrmod1 and a few other cases to load constants. |
| 1041 bool fit_to_shifter(Instr* instr, uint32_t imm32, bool addrmode1 = true); |
| 1042 |
| 1020 // Labels | 1043 // Labels |
| 1021 void print(Label* L); | 1044 void print(Label* L); |
| 1022 void bind_to(Label* L, int pos); | 1045 void bind_to(Label* L, int pos); |
| 1023 void link_to(Label* L, Label* appendix); | 1046 void link_to(Label* L, Label* appendix); |
| 1024 void next(Label* L); | 1047 void next(Label* L); |
| 1025 | 1048 |
| 1026 // Record reloc info for current pc_ | 1049 // Record reloc info for current pc_ |
| 1027 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 1050 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 1028 | 1051 |
| 1029 friend class RegExpMacroAssemblerARM; | 1052 friend class RegExpMacroAssemblerARM; |
| 1030 friend class RelocInfo; | 1053 friend class RelocInfo; |
| 1031 friend class CodePatcher; | 1054 friend class CodePatcher; |
| 1032 }; | 1055 }; |
| 1033 | 1056 |
| 1034 } } // namespace v8::internal | 1057 } } // namespace v8::internal |
| 1035 | 1058 |
| 1036 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1059 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |