OSDN Git Service

tcg/mips: Support r6 multiply/divide encodings
authorJames Hogan <james.hogan@imgtec.com>
Fri, 2 Oct 2015 12:24:16 +0000 (13:24 +0100)
committerRichard Henderson <rth@twiddle.net>
Mon, 19 Oct 2015 21:04:39 +0000 (11:04 -1000)
commitbc6d0c22b09a72897d9db4482076f89e7de97400
tree7e72d8d515e876c446b8c22989ba2f2dedea113e
parent6e0d096989be52c2b945fc83a9bd15d887bbdb47
tcg/mips: Support r6 multiply/divide encodings

MIPSr6 adds several new integer multiply, divide, and modulo
instructions, and removes several pre-r6 encodings, along with the HI/LO
registers which were the implicit operands of some of those
instructions. Update TCG to use the new instructions when built for r6.

The new instructions actually map much more directly to the TCG ops, as
they only provide a single 32-bit half of the result and in a normal
general purpose register instead of HI or LO.

The mulu2_i32 and muls2_i32 operations are no longer appropriate for r6,
so they are removed from the TCG opcode table. This is because they
would need to emit two separate host instructions anyway (for the high
and low half of the result), which TCG can arrange automatically for us
in the absense of mulu2_i32/muls2_i32 by splitting it into mul_i32 and
mul*h_i32 TCG ops.

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1443788657-14537-6-git-send-email-james.hogan@imgtec.com>
tcg/mips/tcg-target.c
tcg/mips/tcg-target.h