1 /* This is a case extracted from CSiBE which would sometimes contain the
10 where the negated T bit store did not combine properly. Since there are
11 other movt insns and the sequence will try to utilize the 'movt_movrt'
12 patterns, we only check for the extu. */
13 /* { dg-do compile } */
14 /* { dg-options "-O2" } */
15 /* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
16 /* { dg-final { scan-assembler-not "extu" } } */
18 typedef struct transaction_s transaction_t
;
22 transaction_t
* b_transaction
;
23 struct journal_head
*b_cpnext
, *b_cpprev
;
28 struct journal_head
* t_checkpoint_list
;
29 transaction_t
*t_cpnext
, *t_cpprev
;
34 transaction_t
* j_checkpoint_transactions
;
35 unsigned long j_first
, j_last
;
38 typedef struct journal_s journal_t
;
40 extern int __try_to_free_cp_buf (struct journal_head
*jh
);
41 extern int __cleanup_transaction (journal_t
*journal
, transaction_t
*transaction
);
42 extern void __flush_batch (void **bhs
, int *batch_count
);
43 extern void* jh2bh (void*);
46 __flush_buffer (journal_t
*journal
, struct journal_head
*jh
,
47 void **bhs
, int *batch_count
, int *drop_count
)
49 void *bh
= jh2bh (jh
);
53 bhs
[*batch_count
] = bh
;
55 if (*batch_count
== 64)
61 if (jh
->b_cpnext
== jh
)
63 if (__try_to_free_cp_buf (jh
))
73 log_do_checkpoint (journal_t
*journal
, int nblocks
)
75 transaction_t
*transaction
, *last_transaction
, *next_transaction
;
80 transaction
= journal
->j_checkpoint_transactions
;
81 if (transaction
== ((void *)0))
83 last_transaction
= transaction
->t_cpprev
;
84 next_transaction
= transaction
;
87 struct journal_head
*jh
, *last_jh
, *next_jh
;
89 int cleanup_ret
, retry
= 0;
90 transaction
= next_transaction
;
91 next_transaction
= transaction
->t_cpnext
;
92 jh
= transaction
->t_checkpoint_list
;
93 last_jh
= jh
->b_cpprev
;
98 next_jh
= jh
->b_cpnext
;
99 retry
= __flush_buffer(journal
, jh
, bhs
, &batch_count
, &drop_count
);
100 } while (jh
!= last_jh
&& !retry
);
105 cleanup_ret
= __cleanup_transaction(journal
, transaction
);
107 } while (transaction
!= last_transaction
);