From fb2f0795c563a29fed082c3a8d2a2d2aad8224ba Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 14 Sep 2008 23:42:20 -0700 Subject: [PATCH] Fixed JIT 1.2 not compiling code for the SYSREQ.C opcode (bug 2764). This caused LDuke's TF2Nades to crash because spcomp doesn't seem to peephole optimize some sysreq.c's away for float operators (oddity discovered by sawce). --- sourcepawn/jit/x86/jit_x86.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sourcepawn/jit/x86/jit_x86.cpp b/sourcepawn/jit/x86/jit_x86.cpp index e8119e74..eeada3f2 100644 --- a/sourcepawn/jit/x86/jit_x86.cpp +++ b/sourcepawn/jit/x86/jit_x86.cpp @@ -2647,6 +2647,10 @@ jit_rewind: /* Write these last because error jumps should be predicted forwardly (not taken) */ WriteErrorRoutines(data, jit); + AlignMe(jit); + data->jit_sysreq_c = jit->get_outputpos(); + WriteOp_Sysreq_C_Function(jit); + /* Build thunk tables */ if (data->num_thunks > data->max_thunks) { @@ -2709,6 +2713,10 @@ jit_rewind: /* Write these last because error jumps should be predicted as not taken (forward) */ WriteErrorRoutines(data, jit); + AlignMe(jit); + data->jit_sysreq_c = jit->get_outputpos(); + WriteOp_Sysreq_C_Function(jit); + /* Write the thunk offsets. */ for (unsigned int i = 0; i < data->num_thunks; i++) {