summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/assembler-x64.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-12-04 08:20:37 +0100
committerMichaël Zasso <targos@protonmail.com>2018-12-06 15:23:33 +0100
commit9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch)
tree2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/src/x64/assembler-x64.cc
parentb8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff)
downloadandroid-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/x64/assembler-x64.cc')
-rw-r--r--deps/v8/src/x64/assembler-x64.cc53
1 files changed, 44 insertions, 9 deletions
diff --git a/deps/v8/src/x64/assembler-x64.cc b/deps/v8/src/x64/assembler-x64.cc
index 27120e2d15..e52c35a532 100644
--- a/deps/v8/src/x64/assembler-x64.cc
+++ b/deps/v8/src/x64/assembler-x64.cc
@@ -21,6 +21,7 @@
#include "src/code-stubs.h"
#include "src/deoptimizer.h"
#include "src/macro-assembler.h"
+#include "src/string-constants.h"
#include "src/v8.h"
namespace v8 {
@@ -82,7 +83,10 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
// Only use statically determined features for cross compile (snapshot).
if (cross_compile) return;
- if (cpu.has_sse41() && FLAG_enable_sse4_1) supported_ |= 1u << SSE4_1;
+ if (cpu.has_sse41() && FLAG_enable_sse4_1) {
+ supported_ |= 1u << SSE4_1;
+ supported_ |= 1u << SSSE3;
+ }
if (cpu.has_ssse3() && FLAG_enable_ssse3) supported_ |= 1u << SSSE3;
if (cpu.has_sse3() && FLAG_enable_sse3) supported_ |= 1u << SSE3;
// SAHF is not generally available in long mode.
@@ -335,6 +339,7 @@ bool Operand::AddressUsesRegister(Register reg) const {
}
void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) {
+ DCHECK_IMPLIES(isolate == nullptr, heap_object_requests_.empty());
for (auto& request : heap_object_requests_) {
Address pc = reinterpret_cast<Address>(buffer_) + request.offset();
switch (request.kind()) {
@@ -349,6 +354,13 @@ void Assembler::AllocateAndInstallRequestedHeapObjects(Isolate* isolate) {
UpdateCodeTarget(Memory<int32_t>(pc), request.code_stub()->GetCode());
break;
}
+ case HeapObjectRequest::kStringConstant: {
+ const StringConstantBase* str = request.string();
+ CHECK_NOT_NULL(str);
+ Handle<String> allocated = str->AllocateStringConstant(isolate);
+ Memory<Handle<Object>>(pc) = allocated;
+ break;
+ }
}
}
}
@@ -449,6 +461,9 @@ Assembler::Assembler(const AssemblerOptions& options, void* buffer,
ReserveCodeTargetSpace(100);
reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_);
+ if (CpuFeatures::IsSupported(SSE4_1)) {
+ EnableCpuFeature(SSSE3);
+ }
}
void Assembler::GetCode(Isolate* isolate, CodeDesc* desc) {
@@ -943,7 +958,7 @@ void Assembler::bswapq(Register dst) {
emit(0xC8 + dst.low_bits());
}
-void Assembler::bt(Operand dst, Register src) {
+void Assembler::btq(Operand dst, Register src) {
EnsureSpace ensure_space(this);
emit_rex_64(src, dst);
emit(0x0F);
@@ -951,7 +966,7 @@ void Assembler::bt(Operand dst, Register src) {
emit_operand(src, dst);
}
-void Assembler::bts(Operand dst, Register src) {
+void Assembler::btsq(Operand dst, Register src) {
EnsureSpace ensure_space(this);
emit_rex_64(src, dst);
emit(0x0F);
@@ -959,6 +974,23 @@ void Assembler::bts(Operand dst, Register src) {
emit_operand(src, dst);
}
+void Assembler::btsq(Register dst, Immediate imm8) {
+ EnsureSpace ensure_space(this);
+ emit_rex_64(dst);
+ emit(0x0F);
+ emit(0xBA);
+ emit_modrm(0x5, dst);
+ emit(imm8.value_);
+}
+
+void Assembler::btrq(Register dst, Immediate imm8) {
+ EnsureSpace ensure_space(this);
+ emit_rex_64(dst);
+ emit(0x0F);
+ emit(0xBA);
+ emit_modrm(0x6, dst);
+ emit(imm8.value_);
+}
void Assembler::bsrl(Register dst, Register src) {
EnsureSpace ensure_space(this);
@@ -1818,6 +1850,14 @@ void Assembler::movp_heap_number(Register dst, double value) {
emitp(0, RelocInfo::EMBEDDED_OBJECT);
}
+void Assembler::movp_string(Register dst, const StringConstantBase* str) {
+ EnsureSpace ensure_space(this);
+ emit_rex(dst, kPointerSize);
+ emit(0xB8 | dst.low_bits());
+ RequestHeapObject(HeapObjectRequest(str));
+ emitp(0, RelocInfo::EMBEDDED_OBJECT);
+}
+
void Assembler::movq(Register dst, int64_t value, RelocInfo::Mode rmode) {
if (constpool_.TryRecordEntry(value, rmode)) {
// Emit rip-relative move with offset = 0
@@ -4962,12 +5002,7 @@ void Assembler::dq(Label* label) {
// Relocation information implementations.
void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
- DCHECK(!RelocInfo::IsNone(rmode));
- if (options().disable_reloc_info_for_patching) return;
- if (RelocInfo::IsOnlyForSerializer(rmode) &&
- !options().record_reloc_info_for_serialization && !emit_debug_code()) {
- return;
- }
+ if (!ShouldRecordRelocInfo(rmode)) return;
RelocInfo rinfo(reinterpret_cast<Address>(pc_), rmode, data, nullptr);
reloc_info_writer.Write(&rinfo);
}