File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -855,6 +855,18 @@ const StackIterator = union(enum) {
855855 }
856856 }
857857
858+ /// Some architectures make FP unwinding too impractical. For example, due to its very silly ABI
859+ /// design decisions, it's not possible to do generic FP unwinding on MIPS; we would need to do
860+ /// a complicated code scanning algorithm instead. At that point, we may as well just use DWARF.
861+ const fp_unwind_is_impossible = switch (builtin .cpu .arch ) {
862+ .mips ,
863+ .mipsel ,
864+ .mips64 ,
865+ .mips64el ,
866+ = > true ,
867+ else = > false ,
868+ };
869+
858870 /// <https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Respect-the-purpose-of-specific-CPU-registers>
859871 const fp_unwind_is_safe = builtin .cpu .arch == .aarch64 and builtin .os .tag .isDarwin ();
860872
@@ -879,7 +891,14 @@ const StackIterator = union(enum) {
879891 // immediately regardless of anything. But FPs could also be omitted from a different
880892 // linked object, so it's not guaranteed to be safe, unless the target specifically
881893 // requires it.
882- .fp = > abi_requires_backchain or (! builtin .omit_frame_pointer and (fp_unwind_is_safe or allow_unsafe )),
894+ .fp = > s : {
895+ if (fp_unwind_is_impossible ) break :s false ;
896+ if (abi_requires_backchain ) break :s true ;
897+ if (builtin .omit_frame_pointer ) break :s false ;
898+ if (fp_unwind_is_safe ) break :s true ;
899+ if (allow_unsafe ) break :s true ;
900+ break :s false ;
901+ },
883902 };
884903 }
885904
You can’t perform that action at this time.
0 commit comments