X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Farm_utils.s;h=b0585b7b5587601796a9c9f2d513e63aa254c172;hp=edaafb863bc148aa0766a7afd8733533351e8862;hb=69af03a2c2fccc06cb836f42a10b490a48f29c15;hpb=a327967e78393018a9f2a7edb38bc3af657e597a diff --git a/frontend/arm_utils.s b/frontend/arm_utils.s index edaafb86..b0585b7b 100644 --- a/frontend/arm_utils.s +++ b/frontend/arm_utils.s @@ -1,7 +1,10 @@ /* * (C) Gražvydas "notaz" Ignotas, 2010 * - * This work is licensed under the terms of the GNU GPL, version 2 or later. + * This work is licensed under the terms of any of these licenses + * (at your option): + * - GNU GPL, version 2 or later. + * - GNU LGPL, version 2.1 or later. * See the COPYING file in the top-level directory. */ @@ -45,4 +48,25 @@ bgr555_to_rgb565: bx lr + +.global bgr888_to_rgb888 +bgr888_to_rgb888: + @ r2 /= 48 + mov r2, r2, lsr #4 + movw r3, #0x5556 + movt r3, #0x5555 + umull r12,r2, r3, r2 +0: + vld3.8 {d0-d2}, [r1, :64]! + vld3.8 {d3-d5}, [r1, :64]! + vswp d0, d2 + vswp d3, d5 + vst3.8 {d0-d2}, [r0, :64]! + vst3.8 {d3-d5}, [r0, :64]! + subs r2, r2, #1 + bne 0b + + bx lr + + @ vim:filetype=armasm