OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [3c-01.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
#include "harness.h"
2
 
3
vector unsigned char u8;
4
vector signed char s8;
5
vector bool char b8;
6
vector unsigned short u16;
7
vector signed short s16;
8
vector bool short b16;
9
vector unsigned int u32;
10
vector signed int s32;
11
vector bool int b32;
12
vector float f32;
13
vector pixel p16;
14
 
15
static void g(void);
16
 
17
static void f(void *p)
18
{
19
  u8 = vec_ld(16, (unsigned char *)p);
20
  u16 = vec_ld(16, (unsigned short*)p);
21
  u32 = vec_ld(16, (unsigned int*)p);
22
  s8 = vec_ld(16, (signed char *)p);
23
  s16 = vec_ld(16, (short*)p);
24
  s32 = vec_ld(16, (int*)p);
25
  g();
26
  u8 = vec_ld(16, (vector unsigned char*)p);
27
  s8 = vec_ld(16, (vector signed char*)p);
28
  b8 = vec_ld(16, (vector bool char*)p);
29
  g();
30
  u16 = vec_ld(16, (vector unsigned short*)p);
31
  s16 = vec_ld(16, (vector signed short*)p);
32
  b16 = vec_ld(16, (vector bool short*)p);
33
  g();
34
  u32 = vec_ld(16, (vector unsigned int*)p);
35
  s32 = vec_ld(16, (vector signed int*)p);
36
  b32 = vec_ld(16, (vector bool int*)p);
37
  f32 = vec_ld(16, (vector float*)p);
38
  p16 = vec_ld(16, (vector pixel*)p);
39
  g();
40
  u8 = vec_lde(16, (unsigned char *)p);
41
  u16 = vec_lde(16, (unsigned short*)p);
42
  u32 = vec_lde(16, (unsigned int*)p);
43
  s8 = vec_lde(16, (signed char *)p);
44
  s16 = vec_lde(16, (short*)p);
45
  s32 = vec_lde(16, (int*)p);
46
  f32 = vec_ldl(16, (vector float*)p);
47
  p16 = vec_ldl(16, (vector pixel*)p);
48
  g();
49
  u8 = vec_ldl(16, (vector unsigned char*)p);
50
  s8 = vec_ldl(16, (vector signed char*)p);
51
  b8 = vec_ldl(16, (vector bool char*)p);
52
  g();
53
  u16 = vec_ldl(16, (vector unsigned short*)p);
54
  s16 = vec_ldl(16, (vector signed short*)p);
55
  b16 = vec_ldl(16, (vector bool short*)p);
56
  g();
57
  u32 = vec_ldl(16, (vector unsigned int*)p);
58
  s32 = vec_ldl(16, (vector signed int*)p);
59
  b32 = vec_ldl(16, (vector bool int*)p);
60
  f32 = vec_ldl(16, (vector float*)p);
61
  p16 = vec_ldl(16, (vector pixel*)p);
62
}
63
 
64
static void g ()
65
{
66
}
67
 
68
static void test()
69
{
70
  static vector unsigned int value = {1,-2,3,-4};
71
  static vector unsigned int buffer[2];
72
#define chek(v, s) check(vec_all_eq(v, value), s)
73
  buffer[1] = value;
74
  f((void *)buffer);
75
  chek((vector unsigned int) u8, "u8");
76
  chek((vector unsigned int) s8, "s8");
77
  chek((vector unsigned int) b8, "b8");
78
  chek((vector unsigned int) u16, "u16");
79
  chek((vector unsigned int) s16, "s16");
80
  chek((vector unsigned int) b16, "b16");
81
  chek((vector unsigned int) u32, "u32");
82
  chek((vector unsigned int) s32, "s32");
83
  chek((vector unsigned int) b32, "b32");
84
  chek((vector unsigned int) f32, "f32");
85
  chek((vector unsigned int) p16, "p16");
86
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.