,trying to do unsigned x86/x64 asm c backend and arm is messy,
Please add unsigned types.
Unsigned dword/qword
Re: Unsigned dword/qword
For instance this looks like complicated goop because ROR and ROL cant be done in a macro because of SAR <<
and even then it might still fail if the assignments cast to signed
and even then it might still fail if the assignments cast to signed
Code: Select all
Procedure speck_decrypt(*ct.speck_arl,*pt.speck_arl,*k.speck_arl)
Protected t.l, i.l
*pt\e[0]= *ct\e[0]
*pt\e[1]= *ct\e[1]
For i = 0 To 26
*pt\e[0] ! *pt\e[1]
t = *pt\e[0]
CompilerIf #PB_Compiler_Backend = #PB_Backend_Asm
!ror dword [p.v_t] , 3
CompilerElse
!unsigned int tt = (unsigned int) v_t;
!v_t = (unsigned int) ((tt >> 3) | (tt << ((32) - 3)));
CompilerEndIf
*pt\e[0] = t
*pt\e[1] ! *k\e[26 - i]
*pt\e[1] - *pt\e[0]
t = *pt\e[1]
CompilerIf #PB_Compiler_Backend = #PB_Backend_Asm
!rol dword [p.v_t],8
CompilerElse
!tt = (unsigned int) v_t;
!v_t = (unsigned int) ((tt << 8) | (tt >> ((32) - 8)));
CompilerEndIf
*pt\e[1] = t
Next
EndProcedure
Re: Unsigned dword/qword
this is year 2024 , we still need to request this unsigned things to go to the space station