[ARM] Convert X86 string to ARM: LODS, STOS, MOVS, ETC
An attempt to convert X86 string operations to ARM: LODS, STOS, MOVS, SCAS, CMPS and ultimately to translate FASM to native ARM. FASM uses lots of these in its source code.
Is the disassembly correct? First, they mov r11, index size then call _string.a to get direction flag and adjust sizes. Replace @flags=77h with global eflags variable. On entry, r1/ecx=count.
; CONVERT X86 STRING TO ARM: LODS, STOS,
; MOVS, ETC. ASSEMBLE WITH FASMARM:
movsbyte [edi], [esi] stosdword [edi] repscasword [edi] repmovsbyte [edi], [esi] repcmpsbyte [esi], [edi] _string.a: pushr12, lr
mulr1, r1, r11; get total size
movr12, @flags; get flags
ldrr12, [r12] ; if direction
tstr12, FLAG.D; flag (DF=1),
rsbner11, 0; negate element size
rsbner1, 0; negate size
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum