~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to tcg/tcg.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "cpu.h"
30
30
#include "exec/tb-context.h"
31
31
#include "qemu/bitops.h"
 
32
#include "tcg-mo.h"
32
33
#include "tcg-target.h"
33
34
 
34
35
/* XXX: make safe guess about sizes */
79
80
#error unsupported
80
81
#endif
81
82
 
 
83
/* Oversized TCG guests make things like MTTCG hard
 
84
 * as we can't use atomics for cputlb updates.
 
85
 */
 
86
#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
 
87
#define TCG_OVERSIZED_GUEST 1
 
88
#else
 
89
#define TCG_OVERSIZED_GUEST 0
 
90
#endif
 
91
 
82
92
#if TCG_TARGET_NB_REGS <= 32
83
93
typedef uint32_t TCGRegSet;
84
94
#elif TCG_TARGET_NB_REGS <= 64
111
121
#define TCG_TARGET_HAS_eqv_i64          0
112
122
#define TCG_TARGET_HAS_nand_i64         0
113
123
#define TCG_TARGET_HAS_nor_i64          0
 
124
#define TCG_TARGET_HAS_clz_i64          0
 
125
#define TCG_TARGET_HAS_ctz_i64          0
 
126
#define TCG_TARGET_HAS_ctpop_i64        0
114
127
#define TCG_TARGET_HAS_deposit_i64      0
 
128
#define TCG_TARGET_HAS_extract_i64      0
 
129
#define TCG_TARGET_HAS_sextract_i64     0
115
130
#define TCG_TARGET_HAS_movcond_i64      0
116
131
#define TCG_TARGET_HAS_add2_i64         0
117
132
#define TCG_TARGET_HAS_sub2_i64         0
130
145
#ifndef TCG_TARGET_deposit_i64_valid
131
146
#define TCG_TARGET_deposit_i64_valid(ofs, len) 1
132
147
#endif
 
148
#ifndef TCG_TARGET_extract_i32_valid
 
149
#define TCG_TARGET_extract_i32_valid(ofs, len) 1
 
150
#endif
 
151
#ifndef TCG_TARGET_extract_i64_valid
 
152
#define TCG_TARGET_extract_i64_valid(ofs, len) 1
 
153
#endif
133
154
 
134
155
/* Only one of DIV or DIV2 should be defined.  */
135
156
#if defined(TCG_TARGET_HAS_div_i32)
487
508
#define TCG_CALL_DUMMY_TCGV     MAKE_TCGV_I32(-1)
488
509
#define TCG_CALL_DUMMY_ARG      ((TCGArg)(-1))
489
510
 
490
 
typedef enum {
491
 
    /* Used to indicate the type of accesses on which ordering
492
 
       is to be ensured.  Modeled after SPARC barriers.  */
493
 
    TCG_MO_LD_LD  = 0x01,
494
 
    TCG_MO_ST_LD  = 0x02,
495
 
    TCG_MO_LD_ST  = 0x04,
496
 
    TCG_MO_ST_ST  = 0x08,
497
 
    TCG_MO_ALL    = 0x0F,  /* OR of the above */
498
 
 
499
 
    /* Used to indicate the kind of ordering which is to be ensured by the
500
 
       instruction.  These types are derived from x86/aarch64 instructions.
501
 
       It should be noted that these are different from C11 semantics.  */
502
 
    TCG_BAR_LDAQ  = 0x10,  /* Following ops will not come forward */
503
 
    TCG_BAR_STRL  = 0x20,  /* Previous ops will not be delayed */
504
 
    TCG_BAR_SC    = 0x30,  /* No ops cross barrier; OR of the above */
505
 
} TCGBar;
506
 
 
507
511
/* Conditions.  Note that these are laid out for easy manipulation by
508
512
   the functions below:
509
513
     bit 0 is used for inverting;
843
847
 
844
848
#define TCG_CT_ALIAS  0x80
845
849
#define TCG_CT_IALIAS 0x40
 
850
#define TCG_CT_NEWREG 0x20 /* output requires a new register */
846
851
#define TCG_CT_REG    0x01
847
852
#define TCG_CT_CONST  0x02 /* any constant of register size */
848
853
 
897
902
    abort();\
898
903
} while (0)
899
904
 
900
 
void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs);
901
 
 
902
905
#if UINTPTR_MAX == UINT32_MAX
903
906
#define TCGV_NAT_TO_PTR(n) MAKE_TCGV_PTR(GET_TCGV_I32(n))
904
907
#define TCGV_PTR_TO_NAT(n) MAKE_TCGV_I32(GET_TCGV_PTR(n))
1098
1101
#define TB_EXIT_MASK 3
1099
1102
#define TB_EXIT_IDX0 0
1100
1103
#define TB_EXIT_IDX1 1
1101
 
#define TB_EXIT_ICOUNT_EXPIRED 2
1102
1104
#define TB_EXIT_REQUESTED 3
1103
1105
 
1104
1106
#ifdef HAVE_TCG_QEMU_TB_EXEC