[polyml] Negative offset for getX and setX functions in Foreign.Memory

2016-01-15 Thread Phil Clayton
The functions getX and setX in Foreign.Memory take an offset as a Word.word. I'm finding that it is possible to have a negative offset by negating the word offset, e.g. get8 (p, ~ 0w1) Is that guaranteed work generally? Given that Word.wordSize = 63 SysWord.wordSize = 64 I wouldn't have

Re: [polyml] Segmentation Fault When Porting

2016-01-15 Thread James Clarke
They are all big-endian. I haven't tried mipsel; that could help narrow it down. One thing making me not so sure it's an endianness issue is that you support 32-bit PowerPC, and that runs properly. Also the mips builds are broken by GCC's optimisations; adding -fno-omit-frame-pointer made it wor

Re: [polyml] Segmentation Fault When Porting

2016-01-15 Thread David Matthews
I wish I could help but there's not much I can suggest. The only idea that occurs to me is that there is some endian-ness issue that has crept in. Are these little-endian or big-endian? In theory the interpreter should work on both big-endian and little-endian but I've only tested the most r