]> git.proxmox.com Git - qemu.git/commit
tcg: add ext{8,16,32}u_i{32,64} TCG ops
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 30 Sep 2009 21:09:35 +0000 (23:09 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 4 Oct 2009 11:24:45 +0000 (13:24 +0200)
commitcfc86988a830d89ed22433af83711847d7859b15
treedb11df76590d6e22d9c934d99adb129c811344f2
parent3bc0bdcaadef1100ce2413af818d9c8e2f6319fc
tcg: add ext{8,16,32}u_i{32,64} TCG ops

Currently zero extensions ops are implemented by a and op with a
constant. This is then catched in some backend, and replaced by
a zero extension instruction. While this works well on RISC
machines, this adds a useless register move on non-RISC machines.

Example on x86:
  ext16u_i32 r1, r2
is translated into
  mov    %eax,%ebx
  movzwl %bx, %ebx
while the optimized version should be:
  movzwl %ax, %ebx

This patch adds ext{8,16,32}u_i{32,64} TCG ops that can be
implemented in the backends to avoid emitting useless register
moves.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/tcg-op.h
tcg/tcg-opc.h