about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-11-26 10:34:12 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-11-26 10:34:12 +0100
commitc7cc78194ffda7cd69797bc4e5f606465d32de88 (patch)
treef9a231e32ed82068ed61db60f83c30749e686e4e /src
parent089db91b3937b87945d4b811935813c30cf5d8fc (diff)
downloadbox64-c7cc78194ffda7cd69797bc4e5f606465d32de88.tar.gz
box64-c7cc78194ffda7cd69797bc4e5f606465d32de88.zip
[ARM64_DYNAREC][TRACE] Use BLR on ret/retn with TRACE to allow relevant debug informations on bad returns
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/arm64/dynarec_arm64_helper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_helper.c b/src/dynarec/arm64/dynarec_arm64_helper.c
index aca3e788..37f6de8e 100644
--- a/src/dynarec/arm64/dynarec_arm64_helper.c
+++ b/src/dynarec/arm64/dynarec_arm64_helper.c
@@ -652,7 +652,11 @@ void ret_to_epilog(dynarec_arm_t* dyn, int ninst, rex_t rex)
     LDRx_REG_LSL3(x2, x2, x3);
     UBFXx(x3, xRIP, JMPTABL_START0, JMPTABL_SHIFT0);
     LDRx_REG_LSL3(x2, x2, x3);
+    #ifdef HAVE_TRACE
+    BLR(x2);
+    #else
     BR(x2);
+    #endif
     CLEARIP();
 }
 
@@ -695,7 +699,11 @@ void retn_to_epilog(dynarec_arm_t* dyn, int ninst, rex_t rex, int n)
     LDRx_REG_LSL3(x2, x2, x3);
     UBFXx(x3, xRIP, JMPTABL_START0, JMPTABL_SHIFT0);
     LDRx_REG_LSL3(x2, x2, x3);
+    #ifdef HAVE_TRACE
+    BLR(x2);
+    #else
     BR(x2);
+    #endif
     CLEARIP();
 }