[openfirmware] [commit] r2023 - ofw/gui
repository service
svn at openfirmware.info
Mon Nov 15 22:21:15 CET 2010
Author: wmb
Date: Mon Nov 15 22:21:13 2010
New Revision: 2023
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2023
Log:
OLPC XO-1.75 - implemented expand-rect to eliminate compile-time warning.
Modified:
ofw/gui/iconmenu.fth
Modified: ofw/gui/iconmenu.fth
==============================================================================
--- ofw/gui/iconmenu.fth Sat Nov 13 00:57:55 2010 (r2022)
+++ ofw/gui/iconmenu.fth Mon Nov 15 22:21:13 2010 (r2023)
@@ -177,6 +177,30 @@
c;
[then]
+[ifdef] arm-assembler
+code expand-rect ( src dst w h --- )
+ mov r0,tos \ r0: Height of source image in pixels
+ ldmia sp!,{r1,r2,r3,tos} \ r1: Width of source, r2: dst address, r3: src address
+ begin
+ add r5,r3,r1,lsl #2 \ End address for this line
+ begin
+ ldrh r4,[r3] \ Get pixel value
+ inc r3,#2 \ Increment src
+ strh r4,[r2] \ Write pixel to dst
+ strh r4,[r2,#2] \ Duplicate pixel on this line
+ inc r2,#256 \ Next destination line
+ strh r4,[r2] \ Write pixel to next line
+ strh r4,[r2,#2] \ Duplicate pixel on next line
+ dec r2,#256 \ Back to original destination line
+ inc r2,#4 \ Next destination pixel
+ cmp r3,r5 \ End?
+ = until
+ inc r2,#256 \ Skip the next output line - already written
+ decs r0,#1
+ 0= until
+c;
+[then]
+
: expand-icon ( adr - eadr )
/icon alloc-mem tuck ( eadr adr eadr )
dup /icon 0 fill \ temp - clear old data
More information about the openfirmware
mailing list