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> </Options>
</Linking> </Linking>
<Other> <Other>
<OtherDefines Count="1">
<Define0 Value="DEBUG_MTX"/>
</OtherDefines>
<ExecuteAfter> <ExecuteAfter>
<Command Value="$(ProjPath)\tools\fp_rebase\fp_rebase$(ExeExt) &quot;$(OutputFile)&quot; -rebase 0x30000000000 -dwarf"/> <Command Value="$(ProjPath)\tools\fp_rebase\fp_rebase$(ExeExt) &quot;$(OutputFile)&quot; -rebase 0x30000000000 -dwarf"/>
<ShowAllMessages Value="True"/> <ShowAllMessages Value="True"/>

View File

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

View File

@ -1365,6 +1365,25 @@ begin
vm_map_unlock(map); vm_map_unlock(map);
end; 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); procedure pick_locked_internal(var ctx:t_jit_context2);
var var
node:t_jit_context2.p_export_point; node:t_jit_context2.p_export_point;
@ -1398,6 +1417,9 @@ begin
// //
op_jit2native(ctx,true); op_jit2native(ctx,true);
ctx.builder.call_far(node^.native); ctx.builder.call_far(node^.native);
op_debug_info_addr(ctx,node^.native);
op_native2jit(ctx,true); op_native2jit(ctx,true);
// //
op_pop_rip_part0(ctx,0); //out:r14 op_pop_rip_part0(ctx,0); //out:r14

View File

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