Fix bugs reported by Juha Riihimäki <juha.riihimaki@nokia.com>:
commit2ce696baa6fc5d99522cf387b6a4913807fd43ed
authorFilip Navara <filip.navara@gmail.com>
Fri, 21 Aug 2009 06:37:41 +0000 (21 08:37 +0200)
committerFilip Navara <filip.navara@gmail.com>
Fri, 21 Aug 2009 06:37:41 +0000 (21 08:37 +0200)
tree70da0bd9c7a5935f2e62f549ecf4d58b22cc93ee
parent9bd54a4a6723d6b0ab25bb7a3e751d05a6a80d00
Fix bugs reported by Juha Riihimäki <juha.riihimaki@nokia.com>:

i) in function gen_bx_im, the last line (should be line 695 in your git HEAD) should be "tcg_gen_movi_i32..." instead of "tcg_gen_mov_i32". Otherwise BX/BLX immediate instructions will segfault QEMU.

ii) you have a resource leak in disas_vfp_insn; on line 3129 in your git HEAD, you have allocated a new temporary (addr) but if the if-expression on line 3129 is true, it will not be released - I fixed this by adding a "dead_tmp(addr);" line between lines 3141 and 3142 (i.e. the last line of the if-block).

iii) you have another resource issue in disas_thumb_insn; line 8306 should read "if (op != 0xf) dead_tmp(tmp);" instead of just plain "dead_tmp(tmp);" -- this is because in the above code the temporary variable tmp is not initialized if op==0xf and calling dead_tmp on it will cause problems.

Signed-off-by: Filip Navara <filip.navara@gmail.com>
target-arm/translate.c