Kernel - Debugging memcpy use, cut down on some in drvutil
authorJohn Hodge <[email protected]>
Tue, 8 Nov 2011 06:36:59 +0000 (14:36 +0800)
committerJohn Hodge <[email protected]>
Tue, 8 Nov 2011 06:36:59 +0000 (14:36 +0800)
Kernel/arch/x86/lib.c
Kernel/drvutil.c

index 8f8abe6..9dc631d 100644 (file)
@@ -324,6 +324,7 @@ int memcmp(const void *m1, const void *m2, size_t Num)
  */
 void *memcpy(void *Dest, const void *Src, size_t Num)
 {
+//     Debug("\nmemcpy:Num=0x%x by %p", Num, __builtin_return_address(0));
        if( ((Uint)Dest & 3) || ((Uint)Src & 3) )
                __asm__ __volatile__ ("rep movsb" :: "D" (Dest), "S" (Src), "c" (Num));
        else {
index 9d1590b..00ab5ce 100644 (file)
@@ -539,6 +539,9 @@ void DrvUtil_Video_2D_Blit(void *Ent, Uint16 DstX, Uint16 DstY, Uint16 SrcX, Uin
                        }
                }
        }
+       else if(W == FBInfo->Width && FBInfo->Pitch == FBInfo->Width*bytes_per_px) {
+               memmove((Uint8*)FBInfo->Framebuffer + dst, (Uint8*)FBInfo->Framebuffer + src, H*FBInfo->Pitch);
+       }
        else {
                // Normal copy is OK
                while( H -- ) {

UCC git Repository :: git.ucc.asn.au