Helpers that do not trigger exceptions and do only access to the arguments can be declared as const + pure.
Cc: Guan Xuetao <g...@mprc.pku.edu.cn> Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> --- target-unicore32/helper.h | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target-unicore32/helper.h b/target-unicore32/helper.h index 1e45302..4f8b5d7 100644 --- a/target-unicore32/helper.h +++ b/target-unicore32/helper.h @@ -29,9 +29,9 @@ DEF_HELPER_2(adc_cc, i32, i32, i32) DEF_HELPER_2(sub_cc, i32, i32, i32) DEF_HELPER_2(sbc_cc, i32, i32, i32) -DEF_HELPER_2(shl, i32, i32, i32) -DEF_HELPER_2(shr, i32, i32, i32) -DEF_HELPER_2(sar, i32, i32, i32) +DEF_HELPER_FLAGS_2(shl, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32) +DEF_HELPER_FLAGS_2(shr, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32) +DEF_HELPER_FLAGS_2(sar, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32) DEF_HELPER_2(shl_cc, i32, i32, i32) DEF_HELPER_2(shr_cc, i32, i32, i32) DEF_HELPER_2(sar_cc, i32, i32, i32) @@ -51,10 +51,10 @@ DEF_HELPER_2(ucf64_muls, f32, f32, f32) DEF_HELPER_2(ucf64_muld, f64, f64, f64) DEF_HELPER_2(ucf64_divs, f32, f32, f32) DEF_HELPER_2(ucf64_divd, f64, f64, f64) -DEF_HELPER_1(ucf64_negs, f32, f32) -DEF_HELPER_1(ucf64_negd, f64, f64) -DEF_HELPER_1(ucf64_abss, f32, f32) -DEF_HELPER_1(ucf64_absd, f64, f64) +DEF_HELPER_FLAGS_1(ucf64_negs, TCG_CALL_CONST | TCG_CALL_PURE, f32, f32) +DEF_HELPER_FLAGS_1(ucf64_negd, TCG_CALL_CONST | TCG_CALL_PURE, f64, f64) +DEF_HELPER_FLAGS_1(ucf64_abss, TCG_CALL_CONST | TCG_CALL_PURE, f32, f32) +DEF_HELPER_FLAGS_1(ucf64_absd, TCG_CALL_CONST | TCG_CALL_PURE, f64, f64) DEF_HELPER_3(ucf64_cmps, void, f32, f32, i32) DEF_HELPER_3(ucf64_cmpd, void, f64, f64, i32) -- 1.7.2.3