2012-04-05 Pedro Alves <palves@redhat.com>
-Werror=strict-aliasing * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned pointer.
This commit is contained in:
parent
443507505d
commit
9d236627e7
@ -1,3 +1,10 @@
|
||||
2012-04-05 Pedro Alves <palves@redhat.com>
|
||||
|
||||
-Werror=strict-aliasing
|
||||
|
||||
* spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
|
||||
pointer.
|
||||
|
||||
2012-04-04 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* linux-sparc-low.c (sparc_fill_gregset_to_stack)
|
||||
|
@ -206,14 +206,14 @@ store_ppc_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
||||
static int
|
||||
parse_spufs_run (int *fd, CORE_ADDR *addr)
|
||||
{
|
||||
char buf[4];
|
||||
unsigned int insn;
|
||||
CORE_ADDR pc = fetch_ppc_register (32); /* nip */
|
||||
|
||||
/* Fetch instruction preceding current NIP. */
|
||||
if (fetch_ppc_memory (pc-4, buf, 4) != 0)
|
||||
if (fetch_ppc_memory (pc-4, (char *) &insn, 4) != 0)
|
||||
return 0;
|
||||
/* It should be a "sc" instruction. */
|
||||
if (*(unsigned int *)buf != INSTR_SC)
|
||||
if (insn != INSTR_SC)
|
||||
return 0;
|
||||
/* System call number should be NR_spu_run. */
|
||||
if (fetch_ppc_register (0) != NR_spu_run)
|
||||
|
Loading…
x
Reference in New Issue
Block a user