Great! Thanks for your quick reply. Just one more quick question:

I've found several calls to fcfid, what would be the accepted way of adding 
an exception for the g4 in the code, in general?



On Monday, December 23, 2013 1:42:11 PM UTC+1, Andrew Low wrote:
>
> This is the same problem as https://github.com/andrewlow/v8ppc/issues/97
>
> The G4 processor lacks some of the machine instructions the code uses. If 
> you look we've already fixed the G5 that also has a few missing, but not as 
> many as the G4. 
>
> If you want to help please coordinate via the issue. It might be a bit 
> slow as we're in the holiday season.
>  On Dec 23, 2013 4:34 AM, "tio00" <[email protected] <javascript:>> 
> wrote:
>
>> Hi all!
>>
>> I'm totally new to this, and first off I would like to thank everyone for 
>> the awesome work you are doing!
>>
>> I, too, love using old hardware, which is why I recently took an old 
>> Titanium Powerbook G4 and installed Linux Mint PPC on it:
>>
>> cat /etc/issue
>> Linux MintPPC 11 \n \l
>>
>> It works great, and it blew me away when I found that you guys are 
>> porting node.js to ppc. I downloaded the release version and it compiled 
>> successfully, but I received an "Illegal instruction" imediately when 
>> trying to run node and npm. I found this thread and followed your 
>> instructions, and below is the info I got (I removed the comments before 
>> the PrintF's in is_processor to check that the processor was correctly 
>> identified):
>>
>> git clone https://github.com/andrewlow/v8ppc.git
>>
>> LD_SHOW_AUXV=1 /bin/true
>> AT_DCACHEBSIZE:  0x20
>> AT_ICACHEBSIZE:  0x20
>> AT_UCACHEBSIZE:  0x0
>> AT_SYSINFO_EHDR: 0x100000
>> AT_HWCAP:        mmu fpu altivec ppc32
>> AT_PAGESZ:       4096
>> AT_CLKTCK:       100
>> AT_PHDR:         0x10000034
>> AT_PHENT:        32
>> AT_PHNUM:        9
>> AT_BASE:         0x48000000
>> AT_FLAGS:        0x0
>> AT_ENTRY:        0x10000c9c
>> AT_UID:          1000
>> AT_EUID:         1000
>> AT_GID:          1000
>> AT_EGID:         1000
>> AT_SECURE:       0
>> AT_RANDOM:       0xbf9356e0
>> AT_EXECFN:       /bin/true
>> AT_PLATFORM:     ppc7450
>> AT_BASE_PLATFORM:ppc7450
>>
>> cat /proc/cpuinfo 
>> processor : 0
>> cpu : 7455, altivec supported
>> clock : 867.000000MHz
>> revision : 3.2 (pvr 8001 0302)
>> bogomips : 86.64
>> timebase : 33330863
>> platform : PowerMac
>> model : PowerBook3,5
>> machine : PowerBook3,5
>> motherboard : PowerBook3,5 MacRISC2 MacRISC Power Macintosh
>> detected as : 80 (PowerBook Titanium IV)
>> pmac flags : 0000001b
>> L2 cache : 256K unified
>> pmac-generation : NewWorld
>> Memory : 1024 MB
>>
>> gdb out/ppc.debug/d8GNU gdb (GDB) 7.4.1-debian
>> Copyright (C) 2012 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <
>> http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "powerpc-linux-gnu".
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>...
>> Reading symbols from /home/toro/Development/v8ppc/out/ppc.debug/d8...done.
>> (gdb) r --test --stress-opt --always-opt --nobreak-on-abort 
>> --nodead-code-elimination --enable-slow-asserts --debug-code --verify-heap 
>> /home/toro/Development/v8ppc/test/mjsunit/mjsunit.js 
>> /home/toro/Development/v8ppc/test/mjsunit/regress/regress-crbug-3184.js
>> Starting program: /home/toro/Development/v8ppc/out/ppc.debug/d8 --test 
>> --stress-opt --always-opt --nobreak-on-abort --nodead-code-elimination 
>> --enable-slow-asserts --debug-code --verify-heap 
>> /home/toro/Development/v8ppc/test/mjsunit/mjsunit.js 
>> /home/toro/Development/v8ppc/test/mjsunit/regress/regress-crbug-3184.js
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library 
>> "/lib/powerpc-linux-gnu/libthread_db.so.1".
>> ============ Stress 1/2 ============
>> cpu_type = ppc7450
>> cpu_type = ppc7450
>> [New Thread 0x48938480 (LWP 18960)]
>>
>> Program received signal SIGILL, Illegal instruction.
>> 0x4aa0e98c in ?? ()
>> (gdb) bt
>> #0  0x4aa0e98c in ?? ()
>> #1  0x4aa47e18 in ?? ()
>> Backtrace stopped: previous frame inner to this frame (corrupt stack?)
>> (gdb) x/20i $pc-16
>>    0x4aa0e97c: stw     r0,0(r1)
>>    0x4aa0e980: stw     r10,4(r1)
>>    0x4aa0e984: lfd     f6,0(r1)
>>    0x4aa0e988: addi    r1,r1,8
>> => 0x4aa0e98c: fcfid   f6,f6
>>    0x4aa0e990: fcmpu   cr7,f7,f6
>>    0x4aa0e994: bso     cr7,0x4aa0e9b8
>>    0x4aa0e998: beq     cr7,0x4aa0e9a8
>>    0x4aa0e99c: blt     cr7,0x4aa0e9b0
>>    0x4aa0e9a0: li      r3,1
>>    0x4aa0e9a4: blr
>>    0x4aa0e9a8: li      r3,0
>>    0x4aa0e9ac: blr
>>    0x4aa0e9b0: li      r3,-1
>>    0x4aa0e9b4: blr
>>    0x4aa0e9b8: li      r3,-1
>>    0x4aa0e9bc: blr
>>    0x4aa0e9c0: lwz     r5,-1(r3)
>>    0x4aa0e9c4: lbz     r5,7(r5)
>>    0x4aa0e9c8: cmpwi   cr7,r5,166
>> (gdb) 
>>
>> Seems like its stopping at a fcfid, which seems to be a 64 bit 
>> instruction...
>>
>> I'd like to help, but I'm pretty much a noob. But anything I can do, 
>> please let me know. I have everything set up, so I just need a pointer in 
>> the right direction.
>>
>> Again, thanks for all your hard work.
>>
>>
>>
>> On Wednesday, October 16, 2013 3:19:28 PM UTC+2, Andrew Low wrote:
>>>
>>> Chasing this is a side-project, I've got plenty of other stuff I'm 
>>> working on too :) 
>>>
>>> The main reason that this is interesting is that it might help me 
>>> resolve:  https://github.com/andrewlow/v8ppc/issues/93 -> but only if I 
>>> can wrangle up some local hardware. Working over the wire is ok, but very 
>>> very slow. These types of problems require a lot of iterations.
>>>
>>> Thanks for the details on your iBook. One of the guys here has an old G4 
>>> we can try out, but we need to install Linux on it.
>>>
>>> The trace is informative as well. It shows that "lots" of code is 
>>> running, but you hit something specific causing a problem. This is not 
>>> likely an issue with the Node code, but something in V8 (the JS runtime 
>>> engine used by Node).
>>>
>>> If you want to tinker - build the V8 code and run it.
>>>
>>> git clone https://github.com/andrewlow/v8ppc.git
>>> cd v8ppc
>>> make dependencies
>>> make ppc
>>>
>>> Then run the resulting d8 shell.
>>>
>>> ./out/ppc.debug/d8
>>>
>>> If that works, you can try some simple JS code (either type it in to the 
>>> shell, or pass a foo.js file in on the command line).
>>>
>>> To run the V8 test suite, try: 
>>>
>>> tools/run-tests.py -j 12 --progress=dots --no-presubmit 
>>> --arch-and-mode=ppc.debug
>>>
>>> When you have a crash case - running the scenario under gdb and 
>>> capturing some info from there will be helpful.
>>>
>>> gdb out/ppc.debug/d8
>>>
>>> inside gdb:
>>> r <optional command line args>
>>> ... it crashes..
>>> bt                   <- generates a back trace, likely corrupted
>>> x/20i $pc-16      <- dump instructions around the crash location
>>> i r                     <- dump registers
>>>
>>> That data will help isolate the issue.
>>> On Wednesday, October 16, 2013 7:10:37 AM UTC-4, Carlos Arija wrote:
>>>>
>>>> First of all, please do not put much time in this problem. It is just a 
>>>> test.
>>>> Any way, here are the iBook G4 specs, if they are of any use to you.
>>>> And if I could be of any help in your project, just tell me.
>>>>
>>>> /etc/issue
>>>> Debian GNU/Linux 7 \n \l
>>>>
>>>> /proc/cpuinfo
>>>> processor : 0
>>>> cpu : 7447A, altivec supported
>>>> clock : 1199.999000MHz
>>>> revision : 1.2 (pvr 8003 0102)
>>>> bogomips : 73.72
>>>> timebase : 18432000
>>>> platform : PowerMac
>>>> model : PowerBook6,5
>>>> machine : PowerBook6,5
>>>> motherboard : PowerBook6,5 MacRISC3 Power Macintosh 
>>>> detected as : 287 (iBook G4)
>>>> pmac flags : 0000001b
>>>> L2 cache : 512K unified
>>>> pmac-generation : NewWorld
>>>> Memory : 1280 MB
>>>>
>>>> Attachment: result of ./node -trace, until the program crashed with an 
>>>> "illegal instruction"
>>>>
>>>>
>>>> El martes, 15 de octubre de 2013 22:15:28 UTC+2, Andrew Low escribió:
>>>>>
>>>>> I've got some good news and some bad news.
>>>>>
>>>>> Bad news - I can't replicate your problem.
>>>>>
>>>>> Good news - I was able to dig up an old PowerMac running Ubuntu.
>>>>>
>>>>> $ cat /etc/issue
>>>>> Ubuntu 10.04.4 LTS \n \l
>>>>>
>>>>> Unfortunately it appears to be a G5, not a G4.
>>>>>
>>>>> $ cat /proc/cpuinfo
>>>>> processor       : 0
>>>>> cpu             : PPC970FX, altivec supported
>>>>> clock           : 1800.000000MHz
>>>>> revision        : 3.0 (pvr 003c 0300)
>>>>>
>>>>> processor       : 1
>>>>> cpu             : PPC970FX, altivec supported
>>>>> clock           : 1800.000000MHz
>>>>> revision        : 3.0 (pvr 003c 0300)
>>>>>
>>>>> timebase        : 33333333
>>>>> platform        : PowerMac
>>>>> model           : PowerMac7,3
>>>>> machine         : PowerMac7,3
>>>>> motherboard     : PowerMac7,3 MacRISC4 Power Macintosh
>>>>> detected as     : 336 (PowerMac G5)
>>>>> pmac flags      : 00000000
>>>>> L2 cache        : 512K unified
>>>>> pmac-generation : NewWorld
>>>>>
>>>>> FWIW - v8 seems to bootstrap just fine
>>>>>
>>>>> $ ./out/ppc.debug/d8
>>>>> V8 version 3.14.5 (candidate) [console: dumb]
>>>>> d8> 3+4
>>>>> 7
>>>>> d8>
>>>>>
>>>>>
>>>>>
>>>>>  -- 
>> -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "nodejs" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/nodejs/ivGMr-C_m1Y/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to