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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 ldr(dst, MemOperand(sp, 4, PostIndex), cond); | 1285 ldr(dst, MemOperand(sp, 4, PostIndex), cond); |
1286 } | 1286 } |
1287 | 1287 |
1288 void pop() { | 1288 void pop() { |
1289 add(sp, sp, Operand(kPointerSize)); | 1289 add(sp, sp, Operand(kPointerSize)); |
1290 } | 1290 } |
1291 | 1291 |
1292 // Jump unconditionally to given label. | 1292 // Jump unconditionally to given label. |
1293 void jmp(Label* L) { b(L, al); } | 1293 void jmp(Label* L) { b(L, al); } |
1294 | 1294 |
1295 static bool use_immediate_embedded_pointer_loads( | |
1296 const Assembler* assembler) { | |
1297 return CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) && | |
1298 (assembler == NULL || !assembler->predictable_code_size()); | |
1299 } | |
1300 | |
1301 // Check the code size generated from label to here. | 1295 // Check the code size generated from label to here. |
1302 int SizeOfCodeGeneratedSince(Label* label) { | 1296 int SizeOfCodeGeneratedSince(Label* label) { |
1303 return pc_offset() - label->pos(); | 1297 return pc_offset() - label->pos(); |
1304 } | 1298 } |
1305 | 1299 |
1306 // Check the number of instructions generated from label to here. | 1300 // Check the number of instructions generated from label to here. |
1307 int InstructionsGeneratedSince(Label* label) { | 1301 int InstructionsGeneratedSince(Label* label) { |
1308 return SizeOfCodeGeneratedSince(label) / kInstrSize; | 1302 return SizeOfCodeGeneratedSince(label) / kInstrSize; |
1309 } | 1303 } |
1310 | 1304 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1558 | 1552 |
1559 // The bound position, before this we cannot do instruction elimination. | 1553 // The bound position, before this we cannot do instruction elimination. |
1560 int last_bound_pos_; | 1554 int last_bound_pos_; |
1561 | 1555 |
1562 // Code emission | 1556 // Code emission |
1563 inline void CheckBuffer(); | 1557 inline void CheckBuffer(); |
1564 void GrowBuffer(); | 1558 void GrowBuffer(); |
1565 inline void emit(Instr x); | 1559 inline void emit(Instr x); |
1566 | 1560 |
1567 // 32-bit immediate values | 1561 // 32-bit immediate values |
1568 void move_32_bit_immediate(Condition cond, | 1562 void move_32_bit_immediate(Register rd, |
1569 Register rd, | 1563 const Operand& x, |
1570 SBit s, | 1564 Condition cond = al); |
1571 const Operand& x); | |
1572 | 1565 |
1573 // Instruction generation | 1566 // Instruction generation |
1574 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); | 1567 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); |
1575 void addrmod2(Instr instr, Register rd, const MemOperand& x); | 1568 void addrmod2(Instr instr, Register rd, const MemOperand& x); |
1576 void addrmod3(Instr instr, Register rd, const MemOperand& x); | 1569 void addrmod3(Instr instr, Register rd, const MemOperand& x); |
1577 void addrmod4(Instr instr, Register rn, RegList rl); | 1570 void addrmod4(Instr instr, Register rn, RegList rl); |
1578 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); | 1571 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); |
1579 | 1572 |
1580 // Labels | 1573 // Labels |
1581 void print(Label* L); | 1574 void print(Label* L); |
(...skipping 25 matching lines...) Expand all Loading... |
1607 public: | 1600 public: |
1608 explicit EnsureSpace(Assembler* assembler) { | 1601 explicit EnsureSpace(Assembler* assembler) { |
1609 assembler->CheckBuffer(); | 1602 assembler->CheckBuffer(); |
1610 } | 1603 } |
1611 }; | 1604 }; |
1612 | 1605 |
1613 | 1606 |
1614 } } // namespace v8::internal | 1607 } } // namespace v8::internal |
1615 | 1608 |
1616 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1609 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |