X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fcspace_arm.S;h=67778da5879be09eca4e81f914191418861ac8ac;hb=refs%2Fheads%2Fmaster;hp=e9d15a5b72f71a9aaa878298cf6fe9ef7500b10e;hpb=d57557c0644f9294e30657f0c7cf673cf2914695;p=pcsx_rearmed.git diff --git a/frontend/cspace_arm.S b/frontend/cspace_arm.S index e9d15a5b..177b0858 100644 --- a/frontend/cspace_arm.S +++ b/frontend/cspace_arm.S @@ -26,8 +26,7 @@ #endif .endm -.global bgr555_to_rgb565 @ void *dst, const void *src, int bytes -bgr555_to_rgb565: +FUNCTION(bgr555_to_rgb565): @ void *dst, const void *src, int bytes pld_ r1 push {r4-r11,lr} mov lr, #0x001f @@ -35,6 +34,12 @@ bgr555_to_rgb565: orr lr, lr, lsl #16 blt 1f + @ src can be unaligned, but that's very rare, so just force it. + @ The manual says unaligned ldm should fault, and it does on + @ cortex-a78's 32bit mode, but curiously on cortex-a8 it just + @ works and loads the data correctly. + bic r1, r1, #3 + 0: ldmia r1!, {r3-r10} subs r2, #4*8