On Thu, 31 Jul 2014, David Edelsohn wrote: > Thanks for implementing the FENV support. The patch generally looks > good to me. > > My one concern is a detail in the implementation of "update". I do not > have enough experience with GENERIC to verify the details and it seems > like it is missing building an outer COMPOUND_EXPR containing > update_mffs and the CALL_EXPR for update mtfsf.
I suppose what's actually odd there is that you have + tree update_mffs = build2 (MODIFY_EXPR, void_type_node, old_fenv, call_mffs); + + tree old_llu = build1 (VIEW_CONVERT_EXPR, uint64_type_node, update_mffs); so you build a MODIFY_EXPR in void_type_node but then convert it with a VIEW_CONVERT_EXPR. If you'd built the MODIFY_EXPR in double_type_node then the VIEW_CONVERT_EXPR would be meaningful (the value of an assignment a = b being the new value of a), but reinterpreting a void value doesn't make sense. Or you could probably just use call_mffs directly in the VIEW_CONVERT_EXPR without explicitly creating the old_fenv variable. -- Joseph S. Myers jos...@codesourcery.com