Ignore:
Timestamp:
Jun 16, 2017, 4:22:21 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
c6810c8
Parents:
ae359a9d
git-author:
Sebastian Huber <sebastian.huber@…> (06/16/17 04:22:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/16/17 04:22:55)
Message:

bsps/powerpc: Fix warning

Close #3051.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/src/memcpy.c

    rae359a9d rb361cb6c  
    2626#include <libcpu/powerpc-utility.h>
    2727
    28 #define CACHE_LINE_SIZE 32
     28#define PPC_CACHE_ALIGNMENT 32
    2929
    3030#define WORD_SIZE 4
     
    4848    const uint32_t *word_src = (const uint32_t *) src - 1;
    4949
    50     if (n >= 2 * CACHE_LINE_SIZE - WORD_SIZE) {
    51       while ((uintptr_t) (word_dst + 1) % CACHE_LINE_SIZE != 0) {
     50    if (n >= 2 * PPC_CACHE_ALIGNMENT - WORD_SIZE) {
     51      while ((uintptr_t) (word_dst + 1) % PPC_CACHE_ALIGNMENT != 0) {
    5252        uint32_t tmp;
    5353        __asm__ volatile (
     
    6161      }
    6262
    63       while (n >= CACHE_LINE_SIZE) {
     63      while (n >= PPC_CACHE_ALIGNMENT) {
    6464        uint32_t dst_offset = 4;
    6565        uint32_t src_offset = 32 + 4;
     
    9696            [dst_offset] "r" (dst_offset)
    9797        );
    98         n -= CACHE_LINE_SIZE;
     98        n -= PPC_CACHE_ALIGNMENT;
    9999      }
    100100    }
Note: See TracChangeset for help on using the changeset viewer.