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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vmx/] [1c-02.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 "harness.h"
2
 
3
/* Vector types used in aggregates.  */
4
struct { char b; vector unsigned char a; char e; } u8;
5
struct { char b; vector signed char a; char e; } s8;
6
struct { char b; vector bool char a; char e; } b8;
7
struct { char b; vector unsigned short a; char e; } u16;
8
struct { char b; vector signed short a; char e; } s16;
9
struct { char b; vector bool short a; char e; } b16;
10
struct { char b; vector unsigned int a; char e; } u32;
11
struct { char b; vector signed int a; char e; } s32;
12
struct { char b; vector bool int a; char e; } b32;
13
struct { char b; vector float a; char e; } f32;
14
struct { char b; vector pixel a; char e; } p16;
15
 
16
union { char b; vector unsigned char a; } u8u;
17
union { char b; vector signed char a; } s8u;
18
union { char b; vector bool char a; } b8u;
19
union { char b; vector unsigned short a; } u16u;
20
union { char b; vector signed short a; } s16u;
21
union { char b; vector bool short a; } b16u;
22
union { char b; vector unsigned int a; } u32u;
23
union { char b; vector signed int a; } s32u;
24
union { char b; vector bool int a; } b32u;
25
union { char b; vector float a; } f32u;
26
union { char b; vector pixel a; } p16u;
27
 
28
static void test()
29
{
30
  check((long)&u8.a - (long)&u8 == 16, "u8.a");
31
  check((long)&u8.e - (long)&u8 == 32, "u8.e");
32
  check(sizeof(u8) == 48, "sizeof(u8)");
33
  check(sizeof(u8u) == 16, "sizeof(u8u)");
34
}

powered by: WebSVN 2.1.0

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