# Intrinsics that Allow Reading from and Writing to the FS Base and GS Base Registers

There are eight intrinsics that allow reading and writing the value of the FS base and GS base registers at all privilege levels and in 64-bit mode only.

These intrinsics are mapped to corresponding 3rd Generation Intel® Core™ Processor extension instructions.

Parent topic: Intrinsics for Later Generation Intel® Core™ Processor Instruction Extensions

- _readfsbase_u32(), _readfsbase_u64()
  Read the value of the FS base register. Both intrinsics are mapped to `RDFSBASE` instruction.
- _readgsbase_u32(), _readgsbase_u64()
  Read the value of the GS base register. Both intrinsics are mapped to `RDGSBASE` instruction.
- _writefsbase_u32(), _writefsbase_u64()
  Write the value to the FS base register. Both intrinsics are mapped to `WRFSBASE` instruction.
- _writegsbase_u32(), _writegsbase_u64()
  Write the value to the GS base register. Both intrinsics are mapped to `WRGSBASE` instruction.