diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2011-01-22 12:39:16 +0100 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2011-01-22 12:39:16 +0100 |
commit | e0a42ebc0831e3ae18e965cc202b5d6649cc38f2 (patch) | |
tree | 1b2158cd5d44b15e573794edfc47a8d2e9e70986 /target-microblaze/op_helper.c | |
parent | 7e9e4330080f40a964cfed2b334b5e231e967792 (diff) |
microblaze: Improve subkc
Move code from the helper into the translator. The remaining
helper parts can reuse helper_addkc, making it possible to
remove helper_subkc entirely.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-microblaze/op_helper.c')
-rw-r--r-- | target-microblaze/op_helper.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index eb5a8b7df3..59e4674ded 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -138,28 +138,6 @@ uint32_t helper_addkc(uint32_t a, uint32_t b, uint32_t cf) return ncf; } -uint32_t helper_subkc(uint32_t a, uint32_t b, uint32_t k, uint32_t c) -{ - uint32_t d, cf = 1, ncf; - - if (c) - cf = env->sregs[SR_MSR] >> 31; - assert(cf == 0 || cf == 1); - d = b + ~a + cf; - - if (!k) { - ncf = compute_carry(b, ~a, cf); - assert(ncf == 0 || ncf == 1); - if (ncf) - env->sregs[SR_MSR] |= MSR_C | MSR_CC; - else - env->sregs[SR_MSR] &= ~(MSR_C | MSR_CC); - } - D(qemu_log("%x = %x + %x cf=%d ncf=%d k=%d c=%d\n", - d, a, b, cf, ncf, k, c)); - return d; -} - static inline int div_prepare(uint32_t a, uint32_t b) { if (b == 0) { |