1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-common" } */
3 /* ??? we should be able to get down to 4 movt, but first we'll have to
4 teach mov2add about flag handling. Maybe add the code that was removed in
5 r144425 from regmove to postreload; epiphany needs tweaks to the addsi3
6 expander to generate a CC reg clobber in the pass. */
7 /* { dg-final { scan-assembler-times "movt" 6 } } */
9 typedef unsigned int uint32_t;
10 typedef unsigned int uint16_t;
14 uint32_t inner_stride
;
16 uint32_t outer_stride
;
20 typedef struct dma_desc e_dma_desc_t
;
25 #define NULL ((void *)0)
27 static inline void _ez_dma_set(register e_dma_desc_t
*dma
,
30 uint16_t inner_src
, uint16_t inner_dst
,
31 uint16_t inner_count
, uint16_t outer_count
,
32 uint16_t outer_src
, uint16_t outer_dst
,
33 void *src
, void*dst
) {
34 //register e_dma_desc_t *dmap = dma;
36 dma
->config
= config
| (((uint32_t)next
)<<16);
37 dma
->inner_stride
= (inner_dst
<< 16) | inner_src
;
38 dma
->count
= (inner_count
<< 16) | outer_count
;
39 dma
->outer_stride
= (outer_dst
<< 16) | outer_src
;
44 void __attribute__((section(".text.ds1")))
46 register e_dma_desc_t
*dmap
= &dma
;
48 _ez_dma_set(dmap
, 3, NULL
,