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: https://svn.code.sf.net/p/mingw-w64/code@5950 4407c894-4637-0410-b4f5-ada5f102cad1
1) Move these functions to intrin-impl.h:

_BitScanForward, _BitScanReverse
_BitScanForward64, _BitScanReverse64

2) Update inline asm code:

a) Remove "memory" clobber.
b) Remove volatile keyword.
c) Change (Mask) from output to input.
d) Change constraint for (n) to "r".
e) add "cc" clobber.
f) Use symbolic names.
g) Support both att and intel asm formats.

git-svn-id: https://svn.code.sf.net/p/mingw-w64/code@5951 4407c894-4637-0410-b4f5-ada5f102cad1