diff options
Diffstat (limited to 'target/hexagon/genptr.c')
-rw-r--r-- | target/hexagon/genptr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index 9dbebc64b5..333f7d74bf 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -361,5 +361,16 @@ static inline void gen_store_conditional8(CPUHexagonState *env, tcg_gen_movi_tl(hex_llsc_addr, ~0); } +static TCGv gen_8bitsof(TCGv result, TCGv value) +{ + TCGv zero = tcg_const_tl(0); + TCGv ones = tcg_const_tl(0xff); + tcg_gen_movcond_tl(TCG_COND_NE, result, value, zero, ones, zero); + tcg_temp_free(zero); + tcg_temp_free(ones); + + return result; +} + #include "tcg_funcs_generated.c.inc" #include "tcg_func_table_generated.c.inc" |