This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Fix 20000724-1.c


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:

    Richard> No they wouldn't.  The stack frame got deallocated too
    Richard> early.  An interrupt could arrive and clobber the memory
    Richard> even if the asm itself wouldn't.

Yup, I get it now.

    >> ] If the side-effects of your instruction are not purely
    >> external, but ] will affect variables in your program in ways
    >> other than reading the ] inputs and clobbering the specified
    >> registers or memory, you should ] write the `volatile' keyword
    >> to prevent future versions of GNU CC ] from moving the
    >> instruction around within a core region.

    Richard> On re-reading, this is incredibly misleading.

    >> In fact, that sentence seems to say that a volatile asm can
    >> mess with anything it wants without having anything in its
    >> clobbers at all!

    Richard> Definitely incorrect.

OK.

I'll try to straighten this out, as I'm in the docs now anyhow.

    Richard> It looks as if Jan's regmove changes never got in.  Cause
    Richard> they definitely should have handled this sort of case.  I
    Richard> thought I remembered acking one version of them though...

    Richard> I'll track them down and see what's up.

OK.  Thanks!

Will you revert my bogus test-case change if you find the patch, too,
please?  Thank you!

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]