This commit is contained in:
Pavel 2024-10-24 22:11:46 +03:00
parent 8977674ae7
commit d2d7b7fdbf
4 changed files with 30 additions and 3 deletions

View File

@ -1530,6 +1530,9 @@
</Options>
</Linking>
<Other>
<OtherDefines Count="1">
<Define0 Value="DEBUG_MTX"/>
</OtherDefines>
<ExecuteAfter>
<Command Value="$(ProjPath)\tools\fp_rebase\fp_rebase$(ExeExt) &quot;$(OutputFile)&quot; -rebase 0x30000000000 -dwarf"/>
<ShowAllMessages Value="True"/>

View File

@ -1082,7 +1082,7 @@ begin
if (g_port_table[port_id]<>nil) then
begin
Result:=g_port_table[port_id].Output(ptr);
if (Result<0) then Exit(SCE_AUDIO_OUT_ERROR_BUSY);
if (Result<0) then Result:=SCE_AUDIO_OUT_ERROR_BUSY;
end else
begin
Result:=SCE_AUDIO_OUT_ERROR_NOT_OPENED;

View File

@ -1365,6 +1365,25 @@ begin
vm_map_unlock(map);
end;
procedure op_debug_info_addr(var ctx:t_jit_context2;addr:Pointer);
var
link_jmp:t_jit_i_link;
begin
//debug
if debug_info then
begin
link_jmp:=ctx.builder.jmp(nil_link,os8);
//
ctx.builder.cli;
op_set_r14_imm(ctx,Int64(addr));
ctx.builder.sti;
//
link_jmp._label:=ctx.builder.get_curr_label.after;
end;
//debug
end;
procedure pick_locked_internal(var ctx:t_jit_context2);
var
node:t_jit_context2.p_export_point;
@ -1398,6 +1417,9 @@ begin
//
op_jit2native(ctx,true);
ctx.builder.call_far(node^.native);
op_debug_info_addr(ctx,node^.native);
op_native2jit(ctx,true);
//
op_pop_rip_part0(ctx,0); //out:r14

View File

@ -83,10 +83,12 @@ var
{$ENDIF}
begin
{$IFDEF DEBUG_MTX}
if curkthread<>nil then
curkthread^.td_debug_mtx:=@m;
{$ENDIF}
EnterCriticalSection(m.c);
{$IFDEF DEBUG_MTX}
if curkthread<>nil then
curkthread^.td_debug_mtx:=nil;
rbp:=nil;
asm