Skip to content

Commit 86fd661

Browse files
badboybrson
authored andcommitted
Patch panic_unwind to compile, but this is surely broken
1 parent cb3f579 commit 86fd661

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libpanic_unwind/gcc.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ const UNWIND_DATA_REG: (i32, i32) = (3, 4); // R3, R4 / X3, X4
133133
#[cfg(target_arch = "s390x")]
134134
const UNWIND_DATA_REG: (i32, i32) = (6, 7); // R6, R7
135135

136+
// FIXME: This is completely and utterly wrong.
137+
// I copy'n'pasted the x86 thing just to see if asmjs-unknown-emscripten compiles at all
138+
// (the happy path)
139+
#[cfg(target_arch = "asmjs")]
140+
const UNWIND_DATA_REG: (i32, i32) = (0, 2); // EAX, EDX
141+
136142
// The following code is based on GCC's C and C++ personality routines. For reference, see:
137143
// https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/libsupc++/eh_personality.cc
138144
// https://github.com/gcc-mirror/gcc/blob/trunk/libgcc/unwind-c.c

0 commit comments

Comments
 (0)