Revision dbfff4de tcg/tcg-op.h
b/tcg/tcg-op.h | ||
---|---|---|
364 | 364 |
tcg_temp_free_ptr(fn); |
365 | 365 |
} |
366 | 366 |
|
367 |
/* FIXME: Should this be pure? */ |
|
367 |
/* Note: Both tcg_gen_helper32() and tcg_gen_helper64() are currently |
|
368 |
reserved for helpers in tcg-runtime.c. These helpers are all const |
|
369 |
and pure, hence the call to tcg_gen_callN() with TCG_CALL_CONST | |
|
370 |
TCG_CALL_PURE. This may need to be adjusted if these functions |
|
371 |
start to be used with other helpers. */ |
|
368 | 372 |
static inline void tcg_gen_helper32(void *func, TCGv_i32 ret, |
369 | 373 |
TCGv_i32 a, TCGv_i32 b) |
370 | 374 |
{ |
... | ... | |
373 | 377 |
fn = tcg_const_ptr((tcg_target_long)func); |
374 | 378 |
args[0] = GET_TCGV_I32(a); |
375 | 379 |
args[1] = GET_TCGV_I32(b); |
376 |
tcg_gen_callN(&tcg_ctx, fn, 0, 0, GET_TCGV_I32(ret), 2, args); |
|
380 |
tcg_gen_callN(&tcg_ctx, fn, TCG_CALL_CONST | TCG_CALL_PURE, |
|
381 |
0, GET_TCGV_I32(ret), 2, args); |
|
377 | 382 |
tcg_temp_free_ptr(fn); |
378 | 383 |
} |
379 | 384 |
|
380 |
/* FIXME: Should this be pure? */ |
|
381 | 385 |
static inline void tcg_gen_helper64(void *func, TCGv_i64 ret, |
382 | 386 |
TCGv_i64 a, TCGv_i64 b) |
383 | 387 |
{ |
... | ... | |
386 | 390 |
fn = tcg_const_ptr((tcg_target_long)func); |
387 | 391 |
args[0] = GET_TCGV_I64(a); |
388 | 392 |
args[1] = GET_TCGV_I64(b); |
389 |
tcg_gen_callN(&tcg_ctx, fn, 0, 7, GET_TCGV_I64(ret), 2, args); |
|
393 |
tcg_gen_callN(&tcg_ctx, fn, TCG_CALL_CONST | TCG_CALL_PURE, |
|
394 |
7, GET_TCGV_I64(ret), 2, args); |
|
390 | 395 |
tcg_temp_free_ptr(fn); |
391 | 396 |
} |
392 | 397 |
|
Also available in: Unified diff