diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-12-16 12:09:34 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-12-16 18:18:43 -0800 |
| commit | ab4f35c1f1247bd745378621a22340cbf8b7030d (patch) | |
| tree | 78c372520ad316a07e136f6b3f0c11705548eccb | |
| parent | 121c4201844c1bec4a8f2a4450e4b9330ee9bf28 (diff) | |
| download | rust-ab4f35c1f1247bd745378621a22340cbf8b7030d.tar.gz rust-ab4f35c1f1247bd745378621a22340cbf8b7030d.zip | |
rt: Only call check_stack_alignment on linux
| -rw-r--r-- | src/rt/rust_upcall.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index dd7e275cd04..ec1e37bd85f 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -19,8 +19,13 @@ // correctly. Strategically placed at entry to upcalls because they begin on // the rust stack and happen frequently enough to catch most stack changes, // including at the beginning of all landing pads. +// FIXME: Only seems to work on linux +#ifdef __linux__ extern "C" void check_stack_alignment() __attribute__ ((aligned (16))); +#else +static void check_stack_alignment() { } +#endif #define SWITCH_STACK(A, F) upcall_call_shim_on_c_stack((void*)A, (void*)F) |
