OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 // Value cannot be represented by 32 bits, so do a full 64 bit immediate | 1474 // Value cannot be represented by 32 bits, so do a full 64 bit immediate |
1475 // value. | 1475 // value. |
1476 EnsureSpace ensure_space(this); | 1476 EnsureSpace ensure_space(this); |
1477 emit_rex_64(dst); | 1477 emit_rex_64(dst); |
1478 emit(0xB8 | dst.low_bits()); | 1478 emit(0xB8 | dst.low_bits()); |
1479 emitq(value); | 1479 emitq(value); |
1480 } | 1480 } |
1481 } | 1481 } |
1482 | 1482 |
1483 | 1483 |
1484 void Assembler::movq(Register dst, ExternalReference ref) { | |
1485 Address value = reinterpret_cast<Address>(ref.address()); | |
1486 movq(dst, value, RelocInfo::EXTERNAL_REFERENCE); | |
1487 } | |
1488 | |
1489 | |
1490 void Assembler::movq(const Operand& dst, Immediate value) { | 1484 void Assembler::movq(const Operand& dst, Immediate value) { |
1491 EnsureSpace ensure_space(this); | 1485 EnsureSpace ensure_space(this); |
1492 emit_rex_64(dst); | 1486 emit_rex_64(dst); |
1493 emit(0xC7); | 1487 emit(0xC7); |
1494 emit_operand(0, dst); | 1488 emit_operand(0, dst); |
1495 emit(value); | 1489 emit(value); |
1496 } | 1490 } |
1497 | 1491 |
1498 | 1492 |
1499 // Loads the ip-relative location of the src label into the target location | 1493 // Loads the ip-relative location of the src label into the target location |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3078 bool RelocInfo::IsCodedSpecially() { | 3072 bool RelocInfo::IsCodedSpecially() { |
3079 // The deserializer needs to know whether a pointer is specially coded. Being | 3073 // The deserializer needs to know whether a pointer is specially coded. Being |
3080 // specially coded on x64 means that it is a relative 32 bit address, as used | 3074 // specially coded on x64 means that it is a relative 32 bit address, as used |
3081 // by branch instructions. | 3075 // by branch instructions. |
3082 return (1 << rmode_) & kApplyMask; | 3076 return (1 << rmode_) & kApplyMask; |
3083 } | 3077 } |
3084 | 3078 |
3085 } } // namespace v8::internal | 3079 } } // namespace v8::internal |
3086 | 3080 |
3087 #endif // V8_TARGET_ARCH_X64 | 3081 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |