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.dg/] [h8300-div-delay-slot.c] - Blame information for rev 315

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

Line No. Rev Author Line
1 298 jeremybenn
/* Make sure that the H8 backend does not generate a div
2
   instruction in a delay slot. */
3
/* { dg-options "-Os" } */
4
/* { dg-skip-if "" { "h8300*-*-*" } "*" "-msx*" }  */
5
/* { dg-final { scan-assembler-not "\tbra/s\t.*\n\tdiv*" } } */
6
 
7
extern volatile unsigned long timer_ticks;
8
#define timer_ms_elapsed(ticks) (((unsigned long)(timer_ticks-ticks))/10)
9
unsigned long ticks;
10
 
11
unsigned tst_read( unsigned char idx )
12
{
13
        switch( idx )
14
        {
15
                case 0x62: return timer_ms_elapsed(ticks);
16
                case 0x61: return timer_ticks;
17
                default: return 0;
18
        }
19
}

powered by: WebSVN 2.1.0

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