aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-v8_src_codegen_x64_assembler-x64.cc
blob: 95112e0971847feb47aa4a7916c69b58ecc235b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- v8/src/codegen/x64/assembler-x64.cc.orig	2023-07-16 15:47:57 UTC
+++ v8/src/codegen/x64/assembler-x64.cc
@@ -1313,6 +1313,14 @@ void Assembler::hlt() {
   emit(0xF4);
 }
 
+void Assembler::endbr64() {
+  EnsureSpace ensure_space(this);
+  emit(0xF3);
+  emit(0x0f);
+  emit(0x1e);
+  emit(0xfa);
+}
+
 void Assembler::emit_idiv(Register src, int size) {
   EnsureSpace ensure_space(this);
   emit_rex(src, size);
@@ -1580,16 +1588,22 @@ void Assembler::jmp(Handle<Code> target, RelocInfo::Mo
   emitl(code_target_index);
 }
 
-void Assembler::jmp(Register target) {
+void Assembler::jmp(Register target, bool notrack) {
   EnsureSpace ensure_space(this);
+  if (notrack) {
+    emit(0x3e);
+  }
   // Opcode FF/4 r64.
   emit_optional_rex_32(target);
   emit(0xFF);
   emit_modrm(0x4, target);
 }
 
-void Assembler::jmp(Operand src) {
+void Assembler::jmp(Operand src, bool notrack) {
   EnsureSpace ensure_space(this);
+  if (notrack) {
+    emit(0x3e);
+  }
   // Opcode FF/4 m64.
   emit_optional_rex_32(src);
   emit(0xFF);