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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 689 jeremybenn
#include <altivec.h>
2
vector unsigned char u8;
3
vector signed char s8;
4
vector bool char b8;
5
vector unsigned short u16;
6
vector signed short s16;
7
vector bool short b16;
8
vector unsigned int u32;
9
vector signed int s32;
10
vector bool int b32;
11
vector float f32;
12
vector pixel p16;
13
 
14
void f_u8(vector unsigned char *p) {
15
  u8 = *p;
16
}
17
void f_s8(vector signed char *p) {
18
  s8 = *p;
19
}
20
void f_b8(vector bool char *p) {
21
  b8 = *p;
22
}
23
void f_u16(vector unsigned short *p) {
24
  u16 = *p;
25
}
26
void f_s16(vector signed short *p) {
27
  s16 = *p;
28
}
29
void f_b16(vector bool short *p) {
30
  b16 = *p;
31
}
32
void f_u32(vector unsigned int *p) {
33
  u32 = *p;
34
}
35
void f_s32(vector signed int *p) {
36
  s32 = *p;
37
}
38
void f_b32(vector bool int *p) {
39
  b32 = *p;
40
}
41
void f_f32(vector float *p) {
42
  f32 = *p;
43
}
44
void f_p16(vector pixel *p) {
45
  p16 = *p;
46
}
47
 
48
int main() {
49
  vector unsigned char u8 = ((vector unsigned char){1, 2, 3, 4, 5, 6, 7, 8,
50
                                                   9, 10,11,12,13,14,15,16});
51
  vector signed char s8 = ((vector signed char){1, 2, 3, 4, 5, 6, 7, 8,
52
                                               9, 10,11,12,13,14,15,16});
53
  vector bool char b8 = ((vector bool char){0, -1, 0, -1, 0, 0, 0, 0,
54
                                           -1, -1, -1, -1, 0, -1, 0, -1});
55
  vector unsigned short u16 = ((vector unsigned short){1, 2, 3, 4, 5, 6, 7, 8});
56
  vector signed short s16 = ((vector signed short){1, 2, 3, 4, 5, 6, 7, 8});
57
  vector bool short b16 = ((vector bool short){-1, 0, -1, 0, -1, -1, 0, 0});
58
  vector unsigned int u32 = ((vector unsigned int){1, 2, 3, 4});
59
  vector signed int s32 = ((vector signed int){1, 2, 3, 4});
60
  vector bool int b32 = ((vector bool int){0, -1, -1, 0});
61
  vector float f32 = ((vector float){1, 2, 3, 4});
62
  vector pixel p16 = ((vector pixel){1, 2, 3, 4, 5, 6, 7, 8});
63
  f_u8(&u8);
64
  f_s8(&s8);
65
  f_b8(&b8);
66
  f_u16(&u16);
67
  f_s16(&s16);
68
  f_b16(&b16);
69
  f_u32(&u32);
70
  f_s32(&s32);
71
  f_b32(&b32);
72
  f_f32(&f32);
73
  f_p16(&p16);
74
  return 0;
75
}

powered by: WebSVN 2.1.0

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