Commit 8ff7f824 by Bernd Schmidt Committed by Bernd Schmidt

bfin.c (bfin_optimize_loop): When creating a new basic block, ensure it has an exit edge.

gcc/
	* config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
	block, ensure it has an exit edge.  Emit a barrier after a jump.

gcc/testsuite/
	* gcc.c-torture/compile/20090907-1.c: New test.

From-SVN: r151479
parent 3beb864c
2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.c (bfin_optimize_loop): When creating a new basic
block, ensure it has an exit edge. Emit a barrier after a jump.
2009-09-07 Nick Clifton <nickc@redhat.com>
* gcc.c (this_is_linker_script): New variable. Like
......
......@@ -4185,7 +4185,10 @@ bfin_optimize_loop (loop_info loop)
seq_end = emit_insn (copy_rtx (PATTERN (last_insn)));
}
else
seq_end = emit_jump_insn (gen_jump (label));
{
emit_jump_insn (gen_jump (label));
seq_end = emit_barrier ();
}
}
seq = get_insns ();
......@@ -4233,6 +4236,7 @@ bfin_optimize_loop (loop_info loop)
else
redirect_edge_succ (e, new_bb);
}
e = make_edge (new_bb, loop->head, 0);
}
delete_insn (loop->loop_end);
......
2009-09-07 Bernd Schmidt <bernd.schmidt@analog.com>
* gcc.c-torture/compile/20090907-1.c: New test.
2009-09-06 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/41241
......
struct platform_device;
typedef unsigned long __kernel_size_t;
typedef unsigned short __u16;
typedef unsigned int __u32;
typedef unsigned char u8;
typedef unsigned short u16;
typedef __kernel_size_t size_t;
typedef __u32 uint32_t;
static inline __attribute__ ((always_inline))
uint32_t __attribute__ ((pure)) bfin_dspid (void)
{
return ( {
uint32_t __v; __v;}
);
}
struct list_head {
struct list_head *next, *prev;
};
struct page {
union {
};
struct list_head lru;
};
struct device_driver {
const char *name;
struct module *owner;
};
struct fb_info {
struct device *dev;
};
struct platform_driver {
int (*probe) (struct platform_device *);
int (*remove) (struct platform_device *);
struct device_driver driver;
};
struct firmware {
size_t size;
const u8 *data;
};
struct metronomefb_par {
struct fb_info *info;
};
struct waveform_hdr {
u8 trc;
};
static u8 calc_cksum (int start, int end, u8 * mem)
{
u8 tmp = 0;
int i;
for (i = start; i < end; i++)
tmp += mem[i];
return tmp;
}
extern struct waveform_hdr *wfm_hdr;
extern int wmta;
static int
load_waveform (u8 * mem, size_t size, int m, int t, struct metronomefb_par *par)
{
int tta;
int trn = 0;
int i;
u8 cksum;
int cksum_idx;
struct device *dev = par->info->dev;
for (i = 0; i <= sizeof (*wfm_hdr) + wfm_hdr->trc; i++) {
if (mem[i] > t) {
trn = i - sizeof (*wfm_hdr) - 1;
}
}
tta = * (mem + wmta + m * 4) & 0x00FFFFFF;
cksum_idx = tta + trn * 4 + 3;
cksum = calc_cksum (cksum_idx - 3, cksum_idx, mem);
if (cksum != mem[cksum_idx]) {
abort();
}
}
extern struct firmware *fw_entry;
extern struct metronomefb_par *par;
int metronomefb_probe (struct platform_device *dev)
{
return load_waveform ((u8 *) fw_entry->data, fw_entry->size, 3, 31, par);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment