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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [x86_64/] [abi/] [callabi/] [func-indirect.c] - Blame information for rev 328

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 328 jeremybenn
/* Test for cross x86_64<->w64 abi standard calls via variable.
2
*/
3
/* Origin: Kai Tietz <kai.tietz@onevision.com> */
4
/* { dg-do run } */
5
/* { dg-options "-std=gnu99 -ffast-math" } */
6
#include "callabi.h"
7
 
8
extern void abort (void);
9
 
10
typedef int (CALLABI_CROSS *func)(void *, char *, char *, short, long long);
11
 
12
int CALLABI_CROSS
13
callback(void * ptr, char *string1, char *string2, short number, long long rand)
14
{
15
    return (rand != 0x1234567890abcdefLL);
16
}
17
 
18
int main()
19
{
20
    volatile func callme = callback;
21
    if(callme(0, 0, 0, 0, 0x1234567890abcdefLL))
22
     abort();
23
    return 0;
24
}

powered by: WebSVN 2.1.0

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