diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-10 10:52:05 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-10 10:52:05 +0000 |
commit | b03cce8e08237bb84735aa86aea5d7d7c4633e2d (patch) | |
tree | c9fda19e0192b62af3882b9f4e01b397adf6f33c /tcg/tcg.h | |
parent | 4d7a0880ca35ea95d30583d137b1558d4dd166bc (diff) | |
download | qemu-b03cce8e08237bb84735aa86aea5d7d7c4633e2d.zip qemu-b03cce8e08237bb84735aa86aea5d7d7c4633e2d.tar.gz qemu-b03cce8e08237bb84735aa86aea5d7d7c4633e2d.tar.bz2 |
fixed global variable handling with qemu load/stores - initial global prologue/epilogue implementation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4406 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -90,6 +90,10 @@ typedef struct TCGPool { #define TCG_MAX_TEMPS 512 +/* when the size of the arguments of a called function is smaller than + this value, they are statically allocated in the TB stack frame */ +#define TCG_STATIC_CALL_ARGS_SIZE 128 + typedef int TCGType; #define TCG_TYPE_I32 0 @@ -285,8 +289,11 @@ typedef struct TCGArgConstraint { #define TCG_OPF_BB_END 0x01 /* instruction defines the end of a basic block */ -#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers */ -#define TCG_OPF_SIDE_EFFECTS 0x04 /* instruction has side effects */ +#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers + and potentially update globals. */ +#define TCG_OPF_SIDE_EFFECTS 0x04 /* instruction has side effects : it + cannot be removed if its output + are not used */ typedef struct TCGOpDef { const char *name; @@ -305,6 +312,7 @@ typedef struct TCGTargetOpDef { extern TCGOpDef tcg_op_defs[]; void tcg_target_init(TCGContext *s); +void tcg_target_qemu_prologue(TCGContext *s); #define tcg_abort() \ do {\ @@ -358,3 +366,6 @@ int64_t tcg_helper_div_i64(int64_t arg1, int64_t arg2); int64_t tcg_helper_rem_i64(int64_t arg1, int64_t arg2); uint64_t tcg_helper_divu_i64(uint64_t arg1, uint64_t arg2); uint64_t tcg_helper_remu_i64(uint64_t arg1, uint64_t arg2); + +extern uint8_t code_gen_prologue[]; +#define tcg_qemu_tb_exec(tb_ptr) ((long REGPARM (*)(void *))code_gen_prologue)(tb_ptr) |