From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 21 Aug 2013 14:57:23 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: <20130821184909.51FA2B827@mail.bitblocks.com> References: <2332222c9f75f30c6395f16787280535@brasstown.quanstro.net> <20130821184909.51FA2B827@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] more on why vc can't produce amd64 executables Topicbox-Message-UUID: 738de114-ead8-11e9-9d60-3106f5b1d025 > You're casting a large int into a small int and this seems right. > Just as (uchar)0x1234 => 0x34 > > > marshalling a 64-bit pointer in this way will lay down the > > bytes with the hi and lo reversed. > > Perhaps you meant to do *(uchar*)&x? you're right. what was i thinking. still, pointers are marshaled wrong. compiled on mips, this program #include #include void main(void) { char *p; p = malloc(100); print("%p\n", p); } does this ; 6.crash 6.crash 203443: suicide: sys: trap: #SS pc=0x2048f2 - erik