1) Move these functions to intrin-impl.h:

__readfsbyte, __readfsword, __readfsdword
__writefsbyte, __writefsword, __writefsdword
__readgsbyte, __readgsword, __readgsdword, __readgsqword
__writegsbyte, __writegsword, __writegsdword, __writegsqword

2) Update inline asm code:

a) Change __write* so "Data" is an input.  Without this, the wrong value gets written.
b) Change __write* routines so they are NOT volatile.
c) Change __write* so "Data" uses "ri" constraint for (potentially)(slightly) better performance.
d) Change __read* so they are not volatile.
e) Change __read* so offset is an input param
f) Support both att and intel asm formats for both __read* and __write*

3) Change NtCurrentTeb, GetCurrentFiber, and GetFiberData to use existing routines instead of inline asm.

git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@5950 4407c894-4637-0410-b4f5-ada5f102cad1
21 files changed