summaryrefslogtreecommitdiff
path: root/dyngen.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-03-03 23:23:09 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-03-03 23:23:09 +0000
commit4b74fe1f0013c622693b26141c0ed031a284a45a (patch)
tree4dfd2b0791246a7f1793e5caba05356d940314a2 /dyngen.c
parent586314f2aa62990dead8144e780c4c8c498eece6 (diff)
downloadqemu-4b74fe1f0013c622693b26141c0ed031a284a45a.tar.gz
many fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@19 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'dyngen.c')
-rw-r--r--dyngen.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/dyngen.c b/dyngen.c
index ce38dcaec4..f6b102fefa 100644
--- a/dyngen.c
+++ b/dyngen.c
@@ -198,14 +198,10 @@ void gen_code(const char *name, unsigned long offset, unsigned long size,
{
uint8_t *p;
p = p_end - 1;
- /* find ret */
- while (p > p_start && *p != 0xc3)
- p--;
- /* skip double ret */
- if (p > p_start && p[-1] == 0xc3)
- p--;
if (p == p_start)
error("empty code for %s", name);
+ if (p[0] != 0xc3)
+ error("ret expected at the end of %s", name);
copy_size = p - p_start;
}
break;