From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22478 invoked by alias); 9 Nov 2008 11:44:30 -0000 Received: (qmail 22369 invoked by uid 22791); 9 Nov 2008 11:44:29 -0000 X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 09 Nov 2008 11:43:53 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id E92633B4007C for ; Sun, 9 Nov 2008 11:43:49 +0000 (GMT) X-Virus-Scanned: amavisd-new at ecoscentric.com Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zAgHhlv+VrS7; Sun, 9 Nov 2008 11:43:49 +0000 (GMT) Received: from delenn.bartv.net (hagrid.vpn.ecoscentric.com [192.168.145.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 4510E3B40069 for ; Sun, 9 Nov 2008 11:43:49 +0000 (GMT) Date: Sun, 09 Nov 2008 11:44:00 -0000 Message-Id: From: Bart Veer To: ecos-patches@sourceware.org Subject: fix framebuffer block move support Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2008-11/txt/msg00024.txt.bz2 As per a bug reported on ecos-discuss: 2008-11-09 Bart Veer * src/linear.c: fix the block move operations (new_y > y) overlap handling. Index: src/linear.c =================================================================== RCS file: /cvs/ecos/ecos/packages/io/framebuf/current/src/linear.c,v retrieving revision 1.1 diff -u -p -r1.1 linear.c --- src/linear.c 7 Oct 2008 10:15:04 -0000 1.1 +++ src/linear.c 9 Nov 2008 11:42:01 -0000 @@ -515,9 +515,9 @@ cyg_fb_linear_move_block_8_impl(void* fb dest += (height * stride); for ( ; height; height--) { - __builtin_memcpy(dest, source, width); source -= stride; dest -= stride; + __builtin_memcpy(dest, source, width); } return; } @@ -640,9 +640,9 @@ cyg_fb_linear_move_block_16_impl(void* f dest = (cyg_uint16*)(((cyg_uint8*)dest) + (height * stride8)); width <<= 1; for ( ; height; height--) { - __builtin_memcpy(dest, source, width); source = (cyg_uint16*)(((cyg_uint8*)source) - stride8); dest = (cyg_uint16*)(((cyg_uint8*)dest) - stride8); + __builtin_memcpy(dest, source, width); } return; } @@ -765,9 +765,9 @@ cyg_fb_linear_move_block_32_impl(void* f dest = (cyg_uint32*)(((cyg_uint8*)dest) + (height * stride8)); width <<= 2; for ( ; height; height--) { - __builtin_memcpy(dest, source, width); source = (cyg_uint32*)(((cyg_uint8*)source) - stride8); dest = (cyg_uint32*)(((cyg_uint8*)dest) - stride8); + __builtin_memcpy(dest, source, width); } return; }