|
From: Julian S. <js...@ac...> - 2015-05-13 19:40:36
|
Really, I1 is intended to be something that you could generate by doing a comparison and then used by looking at the condition codes. We could (and sometimes do) generate I1 values into a register, but the code is ugly. The easy way to do what you want is to have your helper return an I32 and do CmpNE(returned_value, mkU32(0)) for the IRStmt test. That should even become reasonably good code in the back end. J On 13/05/15 14:46, Ivo Raisr wrote: > Dear developers, > > Please could you shed some light on why it is not allowed > to return Ity_I1 from a clean helper (CCall). > There is an explicit check in ir_defs.c which barfs: > "Iex.CCall.retty: cannot return :: Ity_I1" > > I would like to use the return value from a clean helper > as the guard condition for IRStmt_Exit. This requires > an IRExpr of type Ity_I1. > > Thank you for any insights, > I. |