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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [h8300-div-delay-slot.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* Make sure that the H8 backend does not generate a div
/* Make sure that the H8 backend does not generate a div
   instruction in a delay slot. */
   instruction in a delay slot. */
/* { dg-options "-Os" } */
/* { dg-options "-Os" } */
/* { dg-skip-if "" { "h8300*-*-*" } "*" "-msx*" }  */
/* { dg-skip-if "" { "h8300*-*-*" } "*" "-msx*" }  */
/* { dg-final { scan-assembler-not "\tbra/s\t.*\n\tdiv*" } } */
/* { dg-final { scan-assembler-not "\tbra/s\t.*\n\tdiv*" } } */
 
 
extern volatile unsigned long timer_ticks;
extern volatile unsigned long timer_ticks;
#define timer_ms_elapsed(ticks) (((unsigned long)(timer_ticks-ticks))/10)
#define timer_ms_elapsed(ticks) (((unsigned long)(timer_ticks-ticks))/10)
unsigned long ticks;
unsigned long ticks;
 
 
unsigned tst_read( unsigned char idx )
unsigned tst_read( unsigned char idx )
{
{
        switch( idx )
        switch( idx )
        {
        {
                case 0x62: return timer_ms_elapsed(ticks);
                case 0x62: return timer_ms_elapsed(ticks);
                case 0x61: return timer_ticks;
                case 0x61: return timer_ticks;
                default: return 0;
                default: return 0;
        }
        }
}
}
 
 

powered by: WebSVN 2.1.0

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