h8300-div-delay-slot.c: New test.
* gcc.dg/h8300-div-delay-slot.c: New test. From-SVN: r157340
This commit is contained in:
parent
6edd81980f
commit
8bb025f55a
@ -1,3 +1,7 @@
|
|||||||
|
2010-03-10 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
|
||||||
|
|
||||||
|
* gcc.dg/h8300-div-delay-slot.c: New test.
|
||||||
|
|
||||||
2010-03-10 Alexander Monakov <amonakov@ispras.ru>
|
2010-03-10 Alexander Monakov <amonakov@ispras.ru>
|
||||||
|
|
||||||
PR tree-optimization/43236
|
PR tree-optimization/43236
|
||||||
|
19
gcc/testsuite/gcc.dg/h8300-div-delay-slot.c
Normal file
19
gcc/testsuite/gcc.dg/h8300-div-delay-slot.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/* Make sure that the H8 backend does not generate a div
|
||||||
|
instruction in a delay slot. */
|
||||||
|
/* { dg-options "-Os" } */
|
||||||
|
/* { dg-skip-if "" { "h8300*-*-*" } "*" "-msx*" } */
|
||||||
|
/* { dg-final { scan-assembler-not "\tbra/s\t.*\n\tdiv*" } } */
|
||||||
|
|
||||||
|
extern volatile unsigned long timer_ticks;
|
||||||
|
#define timer_ms_elapsed(ticks) (((unsigned long)(timer_ticks-ticks))/10)
|
||||||
|
unsigned long ticks;
|
||||||
|
|
||||||
|
unsigned tst_read( unsigned char idx )
|
||||||
|
{
|
||||||
|
switch( idx )
|
||||||
|
{
|
||||||
|
case 0x62: return timer_ms_elapsed(ticks);
|
||||||
|
case 0x61: return timer_ticks;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user