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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 691 jeremybenn
/* Verify that mov is preferred on XScale for loading a 2 byte constant. */
2
/* { dg-do compile } */
3
/* { dg-options "-mcpu=xscale -O" } */
4
/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */
5
/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */
6
/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
7
/* { dg-require-effective-target arm32 } */
8
 
9
unsigned load2(void) __attribute__ ((naked));
10
unsigned load2(void)
11
{
12
    /* Best code would be:
13
       mov r0, =272
14
       add r0, r0, =1
15
       mov pc, lr */
16
 
17
    return 273;
18
}
19
 
20
/* { dg-final { scan-assembler "mov\[   ].*272" } } */

powered by: WebSVN 2.1.0

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