OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 void isb(); | 1494 void isb(); |
1495 | 1495 |
1496 // Alias for system instructions. | 1496 // Alias for system instructions. |
1497 void nop() { hint(NOP); } | 1497 void nop() { hint(NOP); } |
1498 | 1498 |
1499 // Different nop operations are used by the code generator to detect certain | 1499 // Different nop operations are used by the code generator to detect certain |
1500 // states of the generated code. | 1500 // states of the generated code. |
1501 enum NopMarkerTypes { | 1501 enum NopMarkerTypes { |
1502 DEBUG_BREAK_NOP, | 1502 DEBUG_BREAK_NOP, |
1503 INTERRUPT_CODE_NOP, | 1503 INTERRUPT_CODE_NOP, |
| 1504 ADR_FAR_NOP, |
1504 FIRST_NOP_MARKER = DEBUG_BREAK_NOP, | 1505 FIRST_NOP_MARKER = DEBUG_BREAK_NOP, |
1505 LAST_NOP_MARKER = INTERRUPT_CODE_NOP | 1506 LAST_NOP_MARKER = ADR_FAR_NOP |
1506 }; | 1507 }; |
1507 | 1508 |
1508 void nop(NopMarkerTypes n) { | 1509 void nop(NopMarkerTypes n) { |
1509 ASSERT((FIRST_NOP_MARKER <= n) && (n <= LAST_NOP_MARKER)); | 1510 ASSERT((FIRST_NOP_MARKER <= n) && (n <= LAST_NOP_MARKER)); |
1510 mov(Register::XRegFromCode(n), Register::XRegFromCode(n)); | 1511 mov(Register::XRegFromCode(n), Register::XRegFromCode(n)); |
1511 } | 1512 } |
1512 | 1513 |
1513 // FP instructions. | 1514 // FP instructions. |
1514 // Move immediate to FP register. | 1515 // Move immediate to FP register. |
1515 void fmov(FPRegister fd, double imm); | 1516 void fmov(FPRegister fd, double imm); |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2213 ASSERT(is_const_pool_blocked()); | 2214 ASSERT(is_const_pool_blocked()); |
2214 EndBlockPools(); | 2215 EndBlockPools(); |
2215 // Verify we have generated the number of instruction we expected. | 2216 // Verify we have generated the number of instruction we expected. |
2216 ASSERT((pc_offset() + kGap) == buffer_size_); | 2217 ASSERT((pc_offset() + kGap) == buffer_size_); |
2217 // Verify no relocation information has been emitted. | 2218 // Verify no relocation information has been emitted. |
2218 ASSERT(num_pending_reloc_info() == 0); | 2219 ASSERT(num_pending_reloc_info() == 0); |
2219 // Flush the Instruction cache. | 2220 // Flush the Instruction cache. |
2220 size_t length = buffer_size_ - kGap; | 2221 size_t length = buffer_size_ - kGap; |
2221 CPU::FlushICache(buffer_, length); | 2222 CPU::FlushICache(buffer_, length); |
2222 } | 2223 } |
| 2224 |
| 2225 static const int kMovInt64NInstrs = 4; |
| 2226 void MovInt64(const Register& rd, int64_t imm); |
| 2227 |
| 2228 // See definition of PatchAdrFar() for details. |
| 2229 static const int kAdrFarPatchableNNops = kMovInt64NInstrs - 1; |
| 2230 static const int kAdrFarPatchableNInstrs = kAdrFarPatchableNNops + 3; |
| 2231 void PatchAdrFar(Instruction* target); |
2223 }; | 2232 }; |
2224 | 2233 |
2225 | 2234 |
2226 class EnsureSpace BASE_EMBEDDED { | 2235 class EnsureSpace BASE_EMBEDDED { |
2227 public: | 2236 public: |
2228 explicit EnsureSpace(Assembler* assembler) { | 2237 explicit EnsureSpace(Assembler* assembler) { |
2229 assembler->CheckBuffer(); | 2238 assembler->CheckBuffer(); |
2230 } | 2239 } |
2231 }; | 2240 }; |
2232 | 2241 |
2233 } } // namespace v8::internal | 2242 } } // namespace v8::internal |
2234 | 2243 |
2235 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2244 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
OLD | NEW |