]> git.proxmox.com Git - qemu.git/commit
tcg/arm: improve constant loading
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 6 Jan 2011 21:43:13 +0000 (22:43 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 10 Jan 2011 06:30:30 +0000 (07:30 +0100)
commit0f11f25a001f6adca18689192182d415ff3dbb7c
treeb829ea7108e50558b65f1300725a84b76934918f
parenta3e28aa5c748958e5719451aaff88a4d78e09a80
tcg/arm: improve constant loading

Improve constant loading in two ways:
- On all ARM versions, it's possible to load 0xffffff00 = -0x100 using
  the mvn rd, #0. Fix the conditions.
- On <= ARMv6 versions, where movw and movt are not available, load the
  constants using mov and orr with rotations depending on the constant
  to load. This is very useful for example to load constants where the
  low byte is 0. This reduce the generated code size by about 7%.

Also fix the coding style at the same time.

Cc: Andrzej Zaborowski <balrog@zabor.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/arm/tcg-target.c