On 09/08/2016 11:02 AM, Jy V wrote:
Hello to all assembler experts,
I would greatly appreciate if some people could help me prepare some
asm code for FreePascal for Win32, Win64, Linux x86, Linux x64 (and
maybe some ARM32bit + AARCH64)
I am using Lazarus 1.6, FPC 3.0.0 SVN revision 51630
x86_64-win64-win32/win64
Here's an ARM version that runs in 5 cycles on a Cortex A8:
mov r2,r1,lsr #5
mov r12,#1
ldr r3,[r0, r2, lsl #2]!
orr r2,r3,r12,lsl r1
str r2,[r0]
and r0,r12,r3,lsr r1
It's one cycle faster than what the compiler can generate due to it not
doing the pre-indexed writeback optimization when the address
calculation has shifts.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel