Skip to content

Instantly share code, notes, and snippets.

View pascal-cuoq's full-sized avatar

Pascal Cuoq pascal-cuoq

View GitHub Profile
@vegard
vegard / gist:96918be888ef0a583ebd45fbd5cf5e97
Created August 30, 2020 12:21
You must not sleep - Arnulf Øverland, 1937
You must not sleep
Arnulf Øverland, 1937
I woke up one night from a strange dream,
it was like a voice spoke to me,
far away like an underground current -
and I sat up: What do you want with me?
- You must not sleep! You must not sleep!
@merryhime
merryhime / text.md
Last active March 13, 2026 16:20
Playing with segment registers fs and gs on x64

GSBASE and FSBASE

When you're running out of registers while writing a JIT, you might resort to more unconventional methods for memory access. You might choose to resort to segment registers if you need a fixed register for memory offsets.

Instructions such as:

lea    rax,gs:[rcx+rdx*8]
mov    rax,gs:[rcx+rdx*8]

would then be available for your use.