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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [pr43920-2.c] - Blame information for rev 751

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do assemble } */
2
/* { dg-options "-mthumb -Os -save-temps" }  */
3
/* { dg-require-effective-target arm_thumb2_ok } */
4
 
5
#include <stdio.h>
6
 
7
int getFileStartAndLength (int fd, int *start_, size_t *length_)
8
{
9
      int start, end;
10
      size_t length;
11
 
12
      start = lseek (fd, 0L, SEEK_CUR);
13
      end = lseek (fd, 0L, SEEK_END);
14
 
15
      if (start == -1 || end == -1)
16
         return -1;
17
 
18
      length = end - start;
19
      if (length == 0)
20
         return -1;
21
 
22
      *start_ = start;
23
      *length_ = length;
24
 
25
      return 0;
26
}
27
 
28
/* { dg-final { scan-assembler-times "pop" 2 } } */
29
/* { dg-final { scan-assembler-times "beq" 3 } } */
30
/* { dg-final { object-size text <= 54 } } */

powered by: WebSVN 2.1.0

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