runtime: use a fence instruction before rdtsc
commit139e57dc4ad46c8bdf142d607c1819f0727795a3
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Mar 2018 14:31:03 +0000 (7 14:31 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Mar 2018 14:31:03 +0000 (7 14:31 +0000)
treea2f3871cade9720ac021f8cdb38d3be3270e83be
parentf92a3555ee4fde08817ef16db7c8ddd599fde55d
runtime: use a fence instruction before rdtsc

    This implements the same choices made in the gc runtime, except that
    for 32-bit x86 we only use the fence instruction if the processor
    supports SSE2.

    The code here is hacked up for speed; the gc runtime uses straight
    assembler.

    Reviewed-on: https://go-review.googlesource.com/97715

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258336 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
libgo/runtime/runtime_c.c