Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
use pointer size
Browse files Browse the repository at this point in the history
  • Loading branch information
HanKuanChen committed Mar 19, 2019
1 parent b9b77f2 commit 06c6aa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion newlib/libc/machine/riscv/memcpy32_speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <string.h>
#include "../../string/local.h"

#define ALIGNOF(addr) (((uintptr_t)(addr)) & 3)
#define ALIGNOF(addr) (((uintptr_t)(addr)) & (sizeof(void*) - 1))

static void memcpy_4_0(uint8_t *des, const uint8_t *src)
{
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/machine/riscv/memcpy64_speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <string.h>
#include "../../string/local.h"

#define ALIGNOF(addr) (((uintptr_t)(addr)) & 7)
#define ALIGNOF(addr) (((uintptr_t)(addr)) & (sizeof(void*) - 1))

static void memcpy_4_0(uint8_t *des, const uint8_t *src)
{
Expand Down

0 comments on commit 06c6aa4

Please sign in to comment.