diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-02-16 20:30:05 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-02-16 20:30:05 +0000 |
commit | 72cbca10e184637ec0e813ead71975b7446cc695 (patch) | |
tree | 87196dee1ac9743831ba56469d3db52dc4c0bb63 /target-sparc/op.c | |
parent | 34f715e754adad52939d7b187fec655ddf3e0ba8 (diff) |
direct chaining support for SPARC
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@607 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op.c')
-rw-r--r-- | target-sparc/op.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/target-sparc/op.c b/target-sparc/op.c index e466e09f81..1ce3f95094 100644 --- a/target-sparc/op.c +++ b/target-sparc/op.c @@ -643,24 +643,43 @@ void OPPROTO op_next_insn(void) env->npc = env->npc + 4; } -void OPPROTO op_generic_branch(void) +void OPPROTO op_branch(void) +{ + env->npc = PARAM3; /* XXX: optimize */ + JUMP_TB(op_branch, PARAM1, 0, PARAM2); +} + +void OPPROTO op_branch2(void) { if (T2) { - env->npc = PARAM1; + env->npc = PARAM2 + 4; + JUMP_TB(op_branch2, PARAM1, 0, PARAM2); } else { - env->npc = PARAM2; + env->npc = PARAM3 + 4; + JUMP_TB(op_branch2, PARAM1, 1, PARAM3); + } + FORCE_RET(); +} + +void OPPROTO op_branch_a(void) +{ + if (T2) { + env->npc = PARAM2; /* XXX: optimize */ + JUMP_TB(op_generic_branch_a, PARAM1, 0, PARAM3); + } else { + env->npc = PARAM3 + 8; /* XXX: optimize */ + JUMP_TB(op_generic_branch_a, PARAM1, 1, PARAM3 + 4); } FORCE_RET(); } -void OPPROTO op_generic_branch_a(void) +void OPPROTO op_generic_branch(void) { if (T2) { - env->pc = PARAM2; env->npc = PARAM1; } else { - env->pc = PARAM2 + 4; - env->npc = PARAM2 + 8; + env->npc = PARAM2; } FORCE_RET(); } + |