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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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