On 08/13/2013 11:26 AM, Jakub Jelinek wrote: > On Fri, Aug 02, 2013 at 11:05:33AM -1000, Richard Henderson wrote: >> On 08/02/2013 04:45 AM, Andreas Krebbel wrote: >>> ! XCFLAGS="${XCFLAGS} -mzarch -mhtm -msoft-float" >> >> Not good, since _ITM_R{F,D,E,CF,CD,CE} should return values in >> floating point registers; similarly for the write accessors. > > So, would it be enough to compile just beginend.cc with -msoft-float > and the rest normally?
No. >From what I understand of the s390 restriction, we can't touch the floating point registers after starting a transaction, at least until we're committed to restoring them all. Which means that we have to have everything along the path from htm_begin_success == false until a longjmp restores them. This path includes a call to std::operator new, so that makes it a non-starter. Better, I think, to pass the gtm_jmpbuf to htm_begin. Then we can do uint32_t ret = __builtin_tbegin_nofloat (NULL); if (!htm_begin_success(ret)) // restore fpu state from jb return ret; at which point we're back to normal and we can do whatever we want within the normal abi wrt the fpu. r~