On 02/03/2015 03:35 PM, Richard Henderson wrote:
Some of these functions are really quite large. We have a number of
things that ought to be circularly dependent, but we duplicated code
to break that chain for the inlines.
This saved 25% of the code size of one of the translators I examined.
Reviewed-by: Bastian Koppelmann<kbast...@mail.uni-paderborn.de>
Signed-off-by: Richard Henderson<r...@twiddle.net>
---
Makefile.target | 2 +-
tcg/tcg-op.c | 1978 +++++++++++++++++++++++++++++++++++++++++++
tcg/tcg-op.h | 2488 ++++++++-----------------------------------------------
tcg/tcg.c | 137 ---
tcg/tcg.h | 3 -
5 files changed, 2339 insertions(+), 2269 deletions(-)
create mode 100644 tcg/tcg-op.c
+static inline TCGMemOp tcg_canonicalize_memop(TCGMemOp op, bool is64, bool st)
+{
+ switch (op & MO_SIZE) {
+ case MO_8:
+ op &= ~MO_BSWAP;
+ break;
+ case MO_16:
+ break;
+ case MO_32:
+ if (!is64) {
+ op &= ~MO_SIGN;
+ }
+ break;
+ case MO_64:
+ if (!is64) {
+ tcg_abort();
+ }
+ break;
+ }
+ if (st) {
+ op &= ~MO_SIGN;
+ }
I've got some weird trailing whitespace here, but maybe it's just my
mail client.
Cheers,
Bastian