From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20110111185536.GA6160@dinah> References: <20110111185536.GA6160@dinah> Date: Tue, 11 Jan 2011 14:58:10 -0800 Message-ID: From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] plan9 go output faults on 9vx but ok on cpu Topicbox-Message-UUID: 94d42542-ead6-11e9-9d60-3106f5b1d025 On Tue, Jan 11, 2011 at 10:55 AM, Anthony Martin wrote: > Pavel Zholkover once said: >> I'm typing from my phone so I don't have go sources in front of me, >> but 0xdfffefc0 looks like the address I used for per thread G and M >> structs - just bellow struct Tos. >> >> Andrey and I also tried running on a 32-bit 9vx with the same effect. >> >> Is 9vx using a different memory layout than Plan 9? > > The Tos structure is bigger on 64-bit 9vx so the references > to GS will need a different offset. You'll have to change > both src/8l/pass.c:/^patch and the runtime. are you saying change 8l so that it creates code that works on 9vx in the special case that it runs on a 64-bit system? Then we're going to need to make 8l aware of way too much stuff. That strikes me as the wrong direction. I think what you want to do is what my 9vx branch does: on 64- or 32- bit system, the TOS struct is always correctly set up for a 32-bit 9vx binary. If someone wants to send me a go binary I can test tomorrow on 64-bit osx with my 9vx branch. ron