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.

Change-Id: I853679cfdf732395ce0f947b45a7e3844427e1f8
Reviewed-on: https://go-review.googlesource.com/97715
Reviewed-by: Than McIntosh <thanm@google.com>
1 file changed