Revision 2bece2c8 def-helper.h

b/def-helper.h
81 81
#define dh_is_64bit_ptr (TCG_TARGET_REG_BITS == 64)
82 82
#define dh_is_64bit(t) glue(dh_is_64bit_, dh_alias(t))
83 83

  
84
#define dh_is_signed_void 0
85
#define dh_is_signed_i32 0
86
#define dh_is_signed_s32 1
87
#define dh_is_signed_i64 0
88
#define dh_is_signed_s64 1
89
#define dh_is_signed_f32 0
90
#define dh_is_signed_f64 0
91
#define dh_is_signed_tl  0
92
#define dh_is_signed_int 1
93
/* ??? This is highly specific to the host cpu.  There are even special
94
   extension instructions that may be required, e.g. ia64's addp4.  But
95
   for now we don't support any 64-bit targets with 32-bit pointers.  */
96
#define dh_is_signed_ptr 0
97
#define dh_is_signed_env dh_is_signed_ptr
98
#define dh_is_signed(t) dh_is_signed_##t
99

  
100
#define dh_sizemask(t, n) \
101
  sizemask |= dh_is_64bit(t) << (n*2); \
102
  sizemask |= dh_is_signed(t) << (n*2+1)
103

  
84 104
#define dh_arg(t, n) \
85 105
  args[n - 1] = glue(GET_TCGV_, dh_alias(t))(glue(arg, n)); \
86
  sizemask |= dh_is_64bit(t) << n
106
  dh_sizemask(t, n)
87 107

  
88 108
#define dh_arg_decl(t, n) glue(TCGv_, dh_alias(t)) glue(arg, n)
89 109

  
......
138 158
static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1)) \
139 159
{ \
140 160
  TCGArg args[1]; \
141
  int sizemask; \
142
  sizemask = dh_is_64bit(ret); \
161
  int sizemask = 0; \
162
  dh_sizemask(ret, 0); \
143 163
  dh_arg(t1, 1); \
144 164
  tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 1, args); \
145 165
}
......
149 169
    dh_arg_decl(t2, 2)) \
150 170
{ \
151 171
  TCGArg args[2]; \
152
  int sizemask; \
153
  sizemask = dh_is_64bit(ret); \
172
  int sizemask = 0; \
173
  dh_sizemask(ret, 0); \
154 174
  dh_arg(t1, 1); \
155 175
  dh_arg(t2, 2); \
156 176
  tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 2, args); \
......
161 181
    dh_arg_decl(t2, 2), dh_arg_decl(t3, 3)) \
162 182
{ \
163 183
  TCGArg args[3]; \
164
  int sizemask; \
165
  sizemask = dh_is_64bit(ret); \
184
  int sizemask = 0; \
185
  dh_sizemask(ret, 0); \
166 186
  dh_arg(t1, 1); \
167 187
  dh_arg(t2, 2); \
168 188
  dh_arg(t3, 3); \
......
174 194
    dh_arg_decl(t2, 2), dh_arg_decl(t3, 3), dh_arg_decl(t4, 4)) \
175 195
{ \
176 196
  TCGArg args[4]; \
177
  int sizemask; \
178
  sizemask = dh_is_64bit(ret); \
197
  int sizemask = 0; \
198
  dh_sizemask(ret, 0); \
179 199
  dh_arg(t1, 1); \
180 200
  dh_arg(t2, 2); \
181 201
  dh_arg(t3, 3); \

Also available in: Unified diff