« Previous | Next » 

Revision 0f11f25a


Added by Aurelien Jarno almost 11 years ago

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 <>
Signed-off-by: Aurelien Jarno <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences