summaryrefslogtreecommitdiffstats
path: root/tcg/tci
diff options
context:
space:
mode:
authorRichard Henderson2016-06-20 07:59:13 +0200
committerRichard Henderson2016-07-06 05:50:13 +0200
commit59d7c14eeff8d2ad7f61aed86ce5a176113bc153 (patch)
treea35fd8794ff364683cd31b650affc4f3d9289ce1 /tcg/tci
parenttcg: Fix name for high-half register (diff)
downloadqemu-59d7c14eeff8d2ad7f61aed86ce5a176113bc153.tar.gz
qemu-59d7c14eeff8d2ad7f61aed86ce5a176113bc153.tar.xz
qemu-59d7c14eeff8d2ad7f61aed86ce5a176113bc153.zip
tcg: Optimize spills of constants
While we can store constants via constrants on INDEX_op_st_i32 et al, we weren't able to spill constants to backing store. Add a new backend interface, tcg_out_sti, which may store the constant (and is allowed to fail). Rearrange the temp_* helpers so that we only attempt to directly store a constant when the temp is becoming dead/free. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/tci')
-rw-r--r--tcg/tci/tcg-target.inc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c
index fa74d5278e..3c47ea7a9e 100644
--- a/tcg/tci/tcg-target.inc.c
+++ b/tcg/tci/tcg-target.inc.c
@@ -834,6 +834,12 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg arg, TCGReg arg1,
old_code_ptr[1] = s->code_ptr - old_code_ptr;
}
+static inline bool tcg_out_sti(TCGContext *s, TCGType type, TCGArg val,
+ TCGReg base, intptr_t ofs)
+{
+ return false;
+}
+
/* Test if a constant matches the constraint. */
static int tcg_target_const_match(tcg_target_long val, TCGType type,
const TCGArgConstraint *arg_ct)