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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 // ----------------------------------------------------------------------------- | 371 // ----------------------------------------------------------------------------- |
372 // Machine instruction Operands | 372 // Machine instruction Operands |
373 | 373 |
374 // Class Operand represents a shifter operand in data processing instructions | 374 // Class Operand represents a shifter operand in data processing instructions |
375 class Operand BASE_EMBEDDED { | 375 class Operand BASE_EMBEDDED { |
376 public: | 376 public: |
377 // immediate | 377 // immediate |
378 INLINE(explicit Operand(int32_t immediate, | 378 INLINE(explicit Operand(int32_t immediate, |
379 RelocInfo::Mode rmode = RelocInfo::NONE)); | 379 RelocInfo::Mode rmode = RelocInfo::NONE)); |
380 INLINE(explicit Operand(const ExternalReference& f)); | 380 INLINE(explicit Operand(const ExternalReference& f)); |
381 INLINE(explicit Operand(const char* s)); | |
382 explicit Operand(Handle<Object> handle); | 381 explicit Operand(Handle<Object> handle); |
383 INLINE(explicit Operand(Smi* value)); | 382 INLINE(explicit Operand(Smi* value)); |
384 | 383 |
385 // rm | 384 // rm |
386 INLINE(explicit Operand(Register rm)); | 385 INLINE(explicit Operand(Register rm)); |
387 | 386 |
388 // rm <shift_op> shift_imm | 387 // rm <shift_op> shift_imm |
389 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); | 388 explicit Operand(Register rm, ShiftOp shift_op, int shift_imm); |
390 | 389 |
391 // rm <shift_op> rs | 390 // rm <shift_op> rs |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 } | 1133 } |
1135 | 1134 |
1136 void pop() { | 1135 void pop() { |
1137 add(sp, sp, Operand(kPointerSize)); | 1136 add(sp, sp, Operand(kPointerSize)); |
1138 } | 1137 } |
1139 | 1138 |
1140 // Jump unconditionally to given label. | 1139 // Jump unconditionally to given label. |
1141 void jmp(Label* L) { b(L, al); } | 1140 void jmp(Label* L) { b(L, al); } |
1142 | 1141 |
1143 // Check the code size generated from label to here. | 1142 // Check the code size generated from label to here. |
1144 int InstructionsGeneratedSince(Label* l) { | 1143 int SizeOfCodeGeneratedSince(Label* label) { |
1145 return (pc_offset() - l->pos()) / kInstrSize; | 1144 return pc_offset() - label->pos(); |
| 1145 } |
| 1146 |
| 1147 // Check the number of instructions generated from label to here. |
| 1148 int InstructionsGeneratedSince(Label* label) { |
| 1149 return SizeOfCodeGeneratedSince(label) / kInstrSize; |
1146 } | 1150 } |
1147 | 1151 |
1148 // Check whether an immediate fits an addressing mode 1 instruction. | 1152 // Check whether an immediate fits an addressing mode 1 instruction. |
1149 bool ImmediateFitsAddrMode1Instruction(int32_t imm32); | 1153 bool ImmediateFitsAddrMode1Instruction(int32_t imm32); |
1150 | 1154 |
1151 // Class for scoping postponing the constant pool generation. | 1155 // Class for scoping postponing the constant pool generation. |
1152 class BlockConstPoolScope { | 1156 class BlockConstPoolScope { |
1153 public: | 1157 public: |
1154 explicit BlockConstPoolScope(Assembler* assem) : assem_(assem) { | 1158 explicit BlockConstPoolScope(Assembler* assem) : assem_(assem) { |
1155 assem_->StartBlockConstPool(); | 1159 assem_->StartBlockConstPool(); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 public: | 1402 public: |
1399 explicit EnsureSpace(Assembler* assembler) { | 1403 explicit EnsureSpace(Assembler* assembler) { |
1400 assembler->CheckBuffer(); | 1404 assembler->CheckBuffer(); |
1401 } | 1405 } |
1402 }; | 1406 }; |
1403 | 1407 |
1404 | 1408 |
1405 } } // namespace v8::internal | 1409 } } // namespace v8::internal |
1406 | 1410 |
1407 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1411 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |