diff options
Diffstat (limited to 'results/scraper/fex/4104')
| -rw-r--r-- | results/scraper/fex/4104 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/results/scraper/fex/4104 b/results/scraper/fex/4104 new file mode 100644 index 000000000..4b645db69 --- /dev/null +++ b/results/scraper/fex/4104 @@ -0,0 +1,33 @@ +Fix fsgsbase on hostrunner +Once https://github.com/herumi/xbyak/pull/193 is merged, rebase xbyak on latest. + +Then make sure to save and restore fs/gs in the hostrunner. +This will let our unittests use wrfsbase without breaking host TLS, since it can be restored. + +Example for just fs, but should include gs also: +```diff +diff --git a/Source/Tools/TestHarnessRunner/TestHarnessRunner/HostRunner.cpp b/Source/Tools/TestHarnessRunner/TestHarnessRunner/HostRunner.cpp +index 0e9b88cca..9a816ccac 100644 +--- a/Source/Tools/TestHarnessRunner/TestHarnessRunner/HostRunner.cpp ++++ b/Source/Tools/TestHarnessRunner/TestHarnessRunner/HostRunner.cpp +@@ -51,7 +51,8 @@ public: + push(r13); + push(r14); + push(r15); +- sub(rsp, 8); ++ rdfsbase(rbx); ++ push(rbx); + + // Save this stack pointer so we can cleanly shutdown the emulation with a long jump + // regardless of where we were in the stack +@@ -103,8 +104,8 @@ public: + + ThreadStopHandlerAddress = getCurr<uint64_t>(); + +- add(rsp, 8); +- ++ pop(rbx); ++ wrfsbase(rbx); + pop(r15); + pop(r14); +``` \ No newline at end of file |