]> Git Repo - qemu.git/commit
target-mips: simplify LWL/LDL mask generation
authorAurelien Jarno <[email protected]>
Wed, 15 Jul 2015 15:05:09 +0000 (17:05 +0200)
committerLeon Alrae <[email protected]>
Thu, 13 Aug 2015 15:22:52 +0000 (16:22 +0100)
commiteb02cc3f89013612cb05df23b5441741e902bbd2
tree3c520356c13e7cc307cb77db087d1bc795fb8b5a
parentaff2bc6dc6d839caf6df0900437cc2cc9e180605
target-mips: simplify LWL/LDL mask generation

The LWL/LDL instructions mask the GPR with a mask depending on the
address alignement. It is currently computed by doing:

    mask = 0x7fffffffffffffffull >> (t1 ^ 63)

It's simpler to generate it by doing:

    mask = ~(-1 << t1)

It uses one TCG instruction less, and it avoids a 32/64-bit constant
loading which can take a few instructions on RISC hosts.

Cc: Leon Alrae <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Leon Alrae <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
target-mips/translate.c
This page took 0.025131 seconds and 4 git commands to generate.