aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/memcpy/test_memcpy.c
blob: 4a0556927ba83e22f623c446a52ae460cd0645a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>

int main() {
  char buf1[16], buf2[16];
  for(int i=0; i<16; i++) {
    buf1[i] = i;
  }
  for(int i=0; i<16; i++) {
    buf2[i] = 100+i;
  }
  __builtin_memcpy_aligned(buf1, buf2+3, 4, 1);
  for(int i=0; i<16; i++) {
    printf("%d : %d\n", i, buf1[i]);
  }
}