libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Fix word size for MIPS architecture


From: Faraz Shahbazker
Subject: Re: [Libunwind-devel] Fix word size for MIPS architecture
Date: Wed, 10 Dec 2014 13:57:18 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/05/2014 02:25 AM, Vicente Olivert Riera wrote:
On 12/02/2014 07:33 PM, Faraz Shahbazker wrote:
This should be solved within Xorg build: either by allowing the warning
or using --disable-libunwind or an explicit cast to that bit of code.
By the way, it fails for MIPS32 as well. Of course, if the variable to
store the words in libunwind is 64bit, and the pointer size of MIPS32 is
32bit, when the casting is done, the compilation fails. So, is not only
MIPS64 n32 but both MIPS32 and MIPS64 n32. The only variant safe is
MIPS64 n64, which is actually the less common used in the real world.

Build log:
http://autobuild.buildroot.net/results/87b/87be2c95957f9925c1258812e536df72689fc5da/build-end.log
Yes, that is why I suggested changing the Xorg build above.

I am not sure of the exact reasons for unw_word_t being 64-bit for all MIPS. One possibility is support for 64-bit FP registers, which mips32 (post Revision 2) does allow. FP register support is currently broken/unimplemented for MIPS, but that is a different topic. Another is the ability to use 32-bit libunwind to unwind a 64-bit process (64-bit distributions are often built with a 32-bit userland).

Perhaps, pure MIPS32 can be accommodated by defining unw_word_t to be 32-bit under #if defined(UNW_LOCAL_ONLY) && (_MIPS_SIM == _ABIO32)? You'd still need to change something in your Xorg build for n32. The assumption that size_t/ptrdiff_t match the architecture word size is simply not valid for n32.

- Faraz Shahbazker



reply via email to

[Prev in Thread] Current Thread [Next in Thread]