Add allocation and garbage collection infrastructure.
Change-Id: I4b04cdfdf18afb75a7b0df87b509e8156b4a932b
diff --git a/src/thread_x86.cc b/src/thread_x86.cc
index 14cb2b2..718e9b8 100644
--- a/src/thread_x86.cc
+++ b/src/thread_x86.cc
@@ -47,12 +47,11 @@
// Allow easy indirection back to Thread*
self_ = this;
// Sanity check reads from FS goes to this Thread*
- CHECK_EQ(0, OFFSETOF_MEMBER(Thread, self_));
Thread* self_check;
// TODO: use our assembler to generate code
- asm("movl %%fs:0, %0"
+ asm("movl %%fs:(%1), %0"
: "=r"(self_check) // output
- : // input
+ : "r"(OFFSETOF_MEMBER(Thread, self_)) // input
:); // clobber
CHECK_EQ(self_check, this);
}