diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-03-11 00:18:02 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-03-11 00:18:02 +0000 |
commit | f38343aafac3f93dd2109f0a8a25b6f4f14763ef (patch) | |
tree | 64504445c7ddde9e012b6aa4a50a4bb85af5e846 /bfd | |
parent | ec474b350e42761476c4a369dc2475e5cd9eb726 (diff) | |
download | binutils-redhat-f38343aafac3f93dd2109f0a8a25b6f4f14763ef.tar.gz |
* elf32-spu.c (find_function_stack_adjust): Handle sf instruction
used to update stack pointer.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-spu.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2d043f74ee..eac0087c2c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-03-11 Ulrich Weigand <uweigand@de.ibm.com> + + * elf32-spu.c (find_function_stack_adjust): Handle sf instruction + used to update stack pointer. + 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> PR binutils/9921 diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index 3015cd65be..115fa49c57 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -2133,6 +2133,19 @@ find_function_stack_adjust (asection *sec, return reg[rt]; } } + else if (buf[0] == 0x08 && (buf[1] & 0xe0) == 0 /* sf */) + { + int rb = ((buf[1] & 0x1f) << 2) | ((buf[2] & 0xc0) >> 6); + + reg[rt] = reg[rb] - reg[ra]; + if (rt == 1) + { + if (reg[rt] > 0) + break; + *sp_adjust = offset; + return reg[rt]; + } + } else if ((buf[0] & 0xfc) == 0x40 /* il, ilh, ilhu, ila */) { if (buf[0] >= 0x42 /* ila */) |