Skip to content

Commit b4c66fa

Browse files
committed
Patch panic_unwind to compile, but this is surely broken
1 parent ac0e644 commit b4c66fa

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
@@ -130,6 +130,12 @@ const UNWIND_DATA_REG: (i32, i32) = (4, 5); // A0, A1
130130
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
131131
const UNWIND_DATA_REG: (i32, i32) = (3, 4); // R3, R4 / X3, X4
132132

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

0 commit comments

Comments
 (0)