Re: [9fans] arch specific executables

2010-01-27 Thread Ethan Grammatikidis
On 25 Jan 2010, at 5:51 pm, erik quanstrom wrote: On Mon Jan 25 10:00:19 EST 2010, lyn...@orthanc.ca wrote: i have a little program, aux/cpuid, that gets cpuid information for x86 processors. clearly it's not going to run on an arm or mips. is there a standard trick for preventing such a

Re: [9fans] arch specific executables

2010-01-27 Thread erik quanstrom
Heh. :) P9P uses a separate file for each arch: plan9/src/libthread/$os-$arch.s Inferno uses a separate dir. Some of the dirs have C code instead since the asm is only an optimisation in this case. I'd put a test in the mkfile: if cpuid-$objtype exists build that, else.. well,

Re: [9fans] arch specific executables

2010-01-25 Thread Steve Simon
i have a little program, aux/cpuid perhaps this would be better in /dev/cons/cpuid ? just my 2ยข -Steve

Re: [9fans] arch specific executables

2010-01-25 Thread Charles Forsyth
perhaps this would be better in /dev/cons/cpuid ? doppio% ls '#P' '#P/archctl' '#P/cputype' '#P/ioalloc' '#P/iob' '#P/iol' '#P/iow' '#P/irqalloc' '#P/realmode' '#P/realmodemem' doppio% cat '#P/cputype' AMD64 1802 doppio% cat '#P/archctl' cpu AMD64 1802 pge pge on coherence mb586 cmpswap

Re: [9fans] arch specific executables

2010-01-25 Thread Lyndon Nerenberg
doppio% cat '#P/archctl' Isn't archctl more concerned with things specifically of interest to the kernel vm system? That was always my impression. Adding CPUID related output to #P/cputype seems more logical.

Re: [9fans] arch specific executables

2010-01-25 Thread erik quanstrom
On Mon Jan 25 10:00:19 EST 2010, lyn...@orthanc.ca wrote: i have a little program, aux/cpuid, that gets cpuid information for x86 processors. clearly it's not going to run on an arm or mips. is there a standard trick for preventing such a program from being built (and failing)? the

Re: [9fans] arch specific executables

2010-01-25 Thread erik quanstrom
On Mon Jan 25 12:03:08 EST 2010, fors...@terzarima.net wrote: perhaps this would be better in /dev/cons/cpuid ? i don't think so. doppio% cat '#P/cputype' AMD64 1802 doppio% cat '#P/archctl' cpu AMD64 1802 pge pge on coherence mb586 cmpswap cmpswap486 i8253set on none of that was

Re: [9fans] arch specific executables

2010-01-25 Thread Lyndon Nerenberg
x86 assembly doesn't often assemble with an arm assembler. :-) Oh come on. Everything you need to make this work is already there.

Re: [9fans] arch specific executables

2010-01-25 Thread erik quanstrom
On Mon Jan 25 13:11:49 EST 2010, rminn...@gmail.com wrote: On Mon, Jan 25, 2010 at 9:54 AM, erik quanstrom quans...@quanstro.net wrote: ; aux/cpuid -v AuthenticAMD ; aux/cpuid -b AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ ; aux/cpuid -s 00060fb2 0f.6b.02 ; 8.cpuid -n