[PATCH] D33878: Handle NetBSD specific _Unwind_Ptr

Joerg Sonnenberger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 4 14:40:27 PST 2018


joerg added inline comments.


================
Comment at: lib/builtins/gcc_personality_v0.c:248
             _Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
-                          (uintptr_t)exceptionObject);
+                          (TYPE_UNWIND_PTR)exceptionObject);
             _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), 0);
----------------
krytarowski wrote:
> krytarowski wrote:
> > compnerd wrote:
> > > `_Unwind_SetGR` is declared as: `void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word);`
> > > 
> > > So this cast should not be needed.
> > Pity on NetBSD this is:
> > 
> > `void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Ptr);`
> > 
> > So the 3rd argument differs.
> Maybe NetBSD should change the type to `_Unwind_Word` here? @joerg ?
It is plain `uintptr_t`. `_Unwind_Word` isn't part of the IA64 specification, GNU seems to have created it because they didn't want to use uint64_t and somehow didn't think of uintptr_t it seems. I don't really see a point in introducing it.


Repository:
  rL LLVM

https://reviews.llvm.org/D33878





More information about the llvm-commits mailing list