From 8415befbfc4d792c27d4d299c617a40c14f52c53 Mon Sep 17 00:00:00 2001 From: Pavel <68122101+red-prig@users.noreply.github.com> Date: Fri, 23 May 2025 15:08:30 +0300 Subject: [PATCH] compiler shit --- chip/pm4_ring.pas | 2 +- spirv/emit_post_op.pas | 6 +++--- src/ajm/ps4_libsceajm.pas | 6 +++--- src/param_sfo/ps4_libsceplaygo.pas | 2 +- sys/dev/dev_gc.pas | 26 ++++++++++++-------------- sys/elf64.pas | 2 +- sys/kern/kern_namedobj.pas | 2 +- 7 files changed, 22 insertions(+), 24 deletions(-) diff --git a/chip/pm4_ring.pas b/chip/pm4_ring.pas index bf99c18f..d787f25a 100644 --- a/chip/pm4_ring.pas +++ b/chip/pm4_ring.pas @@ -83,7 +83,7 @@ begin Result:=0; if (ring=nil) then Exit(-1); - size:=1 shl BsfQWORD(size); + size:=QWORD(1) shl BsfQWORD(size); if (sizerBase.AsConst.GetData) then @@ -2315,7 +2315,7 @@ begin end; end else begin - data[1]:=(1 shl count)-1; + data[1]:=(QWORD(1) shl count)-1; num_31:=NewImm_q(dtUInt32,data[1],pLine); // @@ -2432,7 +2432,7 @@ begin index:=BsfQWord(data[0]); count:=PopCnt (data[0]); - data[1]:=((1 shl count)-1) shl index; + data[1]:=((QWORD(1) shl count)-1) shl index; if (data[0]=data[1]) then begin diff --git a/src/ajm/ps4_libsceajm.pas b/src/ajm/ps4_libsceajm.pas index 615436d2..b3b211f1 100644 --- a/src/ajm/ps4_libsceajm.pas +++ b/src/ajm/ps4_libsceajm.pas @@ -24,9 +24,9 @@ const SCE_AJM_CODEC_CELP_DEC =12; SCE_AJM_CODEC_CELP_ENC =13; - SCE_AJM_FLAG_SIDEBAND_STREAM =(1 shl 47); - SCE_AJM_FLAG_SIDEBAND_FORMAT =(1 shl 46); - SCE_AJM_FLAG_SIDEBAND_GAPLESS_DECODE=(1 shl 45); + SCE_AJM_FLAG_SIDEBAND_STREAM =(QWORD(1) shl 47); + SCE_AJM_FLAG_SIDEBAND_FORMAT =(QWORD(1) shl 46); + SCE_AJM_FLAG_SIDEBAND_GAPLESS_DECODE=(QWORD(1) shl 45); var FAjmMap:t_id_desc_table; diff --git a/src/param_sfo/ps4_libsceplaygo.pas b/src/param_sfo/ps4_libsceplaygo.pas index 6011e86a..e078662a 100644 --- a/src/param_sfo/ps4_libsceplaygo.pas +++ b/src/param_sfo/ps4_libsceplaygo.pas @@ -105,7 +105,7 @@ function scePlayGoConvertLanguage(systemLang:Integer):ScePlayGoLanguageMask; inl begin if (systemLang>=0) and (systemLang<48) then begin - Result:=(1 shl (64-systemLang-1)); + Result:=(QWORD(1) shl (64-systemLang-1)); end else begin Result:=0; diff --git a/sys/dev/dev_gc.pas b/sys/dev/dev_gc.pas index 3496a366..1075c2e6 100644 --- a/sys/dev/dev_gc.pas +++ b/sys/dev/dev_gc.pas @@ -407,7 +407,7 @@ begin gc_map_hdq_drain(@map_queue_hqd[c_id],size); //set sended bits - send:=send or (1 shl (c_id div 8)); //by pipe id + send:=send or (QWORD(1) shl (c_id div 8)); //by pipe id //It is necessary to force QWORD! Dec(p_id); end; //while @@ -416,7 +416,7 @@ begin //end //clear - bits:=bits and (not (1 shl c_id)); + bits:=bits and (not (QWORD(1) shl c_id)); //It is necessary to force QWORD! end; //while if (send<>0) then @@ -430,7 +430,7 @@ begin pfp_ctx.Flush_stream( t_pm4_stream_type(ord(stCompute0) + c_id) ); //clear - send:=send and (not (1 shl c_id)); + send:=send and (not (QWORD(1) shl c_id)); //It is necessary to force QWORD! end; // @@ -765,7 +765,7 @@ begin id:=(pipeHi - 1) * 32 + pipeLo * 8 + queueId; - if ((map_queue_valid and (1 shl id))<>0) then + if ((map_queue_valid and (QWORD(1) shl id))<>0) then //It is necessary to force QWORD! begin Exit(Integer($804c0012)); end; @@ -780,13 +780,7 @@ begin if (Result=0) then begin - map_queue_valid:=map_queue_valid or (1 shl id); - - { - id:=(pipeHi - 1) * 4 + (pipeLo - 8); - - map_pipe_valid:=map_pipe_valid or (1 shl id); - } + map_queue_valid:=map_queue_valid or (QWORD(1) shl id); //It is necessary to force QWORD! end; end; @@ -854,12 +848,12 @@ begin id:=(pipeHi - 1) * 32 + pipeLo * 8 + queueId; - if ((map_queue_valid and (1 shl id))<>0) then + if ((map_queue_valid and (QWORD(1) shl id))<>0) then //It is necessary to force QWORD! begin gc_unmap_hqd(@map_queue_hqd[id]); - map_queue_valid:=map_queue_valid and (not (1 shl id)); + map_queue_valid:=map_queue_valid and (not (QWORD(1) shl id)); //It is necessary to force QWORD! end; end; @@ -914,7 +908,7 @@ begin id:=(pipeHi - 1) * 32 + pipeLo * 8 + queueId; - if ((map_queue_valid and (1 shl id))=0) then + if ((map_queue_valid and (QWORD(1) shl id))=0) then //It is necessary to force QWORD! begin Exit(Integer($804c0001)); end; @@ -1005,6 +999,8 @@ begin $C0048116: //sceGnmSubmitDone begin + start_gfx_ring; + Writeln('sceGnmSubmitDone'); //rw_wlock(ring_gfx_lock); @@ -1167,6 +1163,8 @@ begin begin start_gfx_ring; + Writeln('sceGnmDingDong'); + gc_retrigger_watchdog_imdone; gc_wait_GC_SRI; diff --git a/sys/elf64.pas b/sys/elf64.pas index c3db0c44..4d085aeb 100644 --- a/sys/elf64.pas +++ b/sys/elf64.pas @@ -674,7 +674,7 @@ end; function SELF_BLOCK_SIZE(i:Int64):Int64; inline; begin Result:=(i shr SELF_PROPS_BLOCK_SIZE_OFFSET) and SELF_PROPS_BLOCK_SIZE_MASK; - Result:=1 shl (Result+12) + Result:=QWORD(1) shl (Result+12) end; function SELF_SEGMENT_INDEX(i:Int64):Integer; inline; diff --git a/sys/kern/kern_namedobj.pas b/sys/kern/kern_namedobj.pas index 699e4fe8..6e878fa5 100644 --- a/sys/kern/kern_namedobj.pas +++ b/sys/kern/kern_namedobj.pas @@ -133,7 +133,7 @@ begin td^.td_retval[0]:=key; - Writeln('namedobj_create(0x',HexStr(QWORD(objp),10),',"',_name,'"):',key); + Writeln('namedobj_create("',_name,'",0x',HexStr(QWORD(objp),10),',0x',HexStr(objt,4),'):',key); Result:=0; end;