Author Topic: What exactly is "Illegal Instruction"?  (Read 3277 times)

samxiao

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://
What exactly is "Illegal Instruction"?
« on: November 17, 2004, 04:11:19 pm »
weird
i install perl, vdesk, mathomatic

all gives me this error .. can't run it

and stardict, gnumeric crashes at starting

any idea?
Zaurus C1000 (formerly SL5500 and C700)
Cacko developer ROM 1.23 beta + Debian Sarge + X/Qt
1GB Transcend 80x SD (ext2) / 512MB Lexar SD (ext2) / 256MB SanDisk CF(vfat)
Netgear MA701 WiFi CF
Ambicom GPS-CF
Pocketop IR keyboard (has positioning problem with C1000)
Brando LCD screen protector

Apple PowerBook 12" G4 Rev. C + Mac OS X 10.4.x (Tiger)

pmf

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
What exactly is "Illegal Instruction"?
« Reply #1 on: November 17, 2004, 04:33:47 pm »
Quote
weird
i install perl, vdesk, mathomatic

all gives me this error .. can't run it

and stardict, gnumeric crashes at starting

any idea?
These applications need to be recompiled with the new toolchain so they don't throw this exception when they reach code segments that need floating-point support.
« Last Edit: November 17, 2004, 04:34:23 pm by pmf »

Laze

  • Hero Member
  • *****
  • Posts: 704
    • View Profile
    • http://www.pdaXrom.org
What exactly is "Illegal Instruction"?
« Reply #2 on: November 17, 2004, 04:57:25 pm »
gnumeric is just stupid gnome :-) Its fixed in next version - but Gnumeric won't be included as default anymore - its way to "bloated" with gnome stuff..
C760 running pdaXrom lastest ;-)
SL5500 Running Cacko Qtopia
512 MB SD Card, 128 MB CF Card, Prism2 CF Wlan.

Always visit http://www.pdaXrom.org for latest news.

blakeyez

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://
What exactly is "Illegal Instruction"?
« Reply #3 on: November 17, 2004, 11:04:42 pm »
Quote
What exactly is "Illegal Instruction"?

Just to clarify for those interested - the 'illegal instruction' error means that the processor does not support one of the assembly instructions compiled into the app you're trying to run.  In this specific case, chances are that it's a floating-point instruction.  The ARM processors in our Zaurii don't have floating-point units (FPUs).  However, in previous ROM releases, the relevant instructions were caught by the kernel and emulated when the illegal instruction interrupt was generated.  In the latest pdaXrom, though, apps are compiled using a technique called 'soft-float' which eliminates the need for the kernel to trap these interrupts (which is SLOOOOW).

So, as someone already pointed out, the short version of that ramble is that these apps need to be recompiled with the new soft-float toolchain

Dave
« Last Edit: November 17, 2004, 11:05:31 pm by blakeyez »

samxiao

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://
What exactly is "Illegal Instruction"?
« Reply #4 on: November 17, 2004, 11:35:44 pm »
Quote
Quote
What exactly is "Illegal Instruction"?

Just to clarify for those interested - the 'illegal instruction' error means that the processor does not support one of the assembly instructions compiled into the app you're trying to run.  In this specific case, chances are that it's a floating-point instruction.  The ARM processors in our Zaurii don't have floating-point units (FPUs).  However, in previous ROM releases, the relevant instructions were caught by the kernel and emulated when the illegal instruction interrupt was generated.  In the latest pdaXrom, though, apps are compiled using a technique called 'soft-float' which eliminates the need for the kernel to trap these interrupts (which is SLOOOOW).

So, as someone already pointed out, the short version of that ramble is that these apps need to be recompiled with the new soft-float toolchain

Dave
i'm currently studying Motorola 68000 assembly in my university


i remember float-point has to deal with ALU

so this means XScale don't have ALU?


we can't do math on it?
that doesn't make any sense to me


thanks for anyone explain clearly to me
Zaurus C1000 (formerly SL5500 and C700)
Cacko developer ROM 1.23 beta + Debian Sarge + X/Qt
1GB Transcend 80x SD (ext2) / 512MB Lexar SD (ext2) / 256MB SanDisk CF(vfat)
Netgear MA701 WiFi CF
Ambicom GPS-CF
Pocketop IR keyboard (has positioning problem with C1000)
Brando LCD screen protector

Apple PowerBook 12" G4 Rev. C + Mac OS X 10.4.x (Tiger)

blakeyez

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://
What exactly is "Illegal Instruction"?
« Reply #5 on: November 17, 2004, 11:40:37 pm »
ALU = Arithmetic/Logic Unit, right? (it's been awhile since my comp. architecture class)

Anyway, yes the zaurus processors are able to do arithmetic, but only INTEGER.  They don't support the floating-point (non-integer) instructions natively.  Some ARM processors do, that's why the instructions exist, but not this specific processor.  I guess you could compare it to the old 386 math co-processor, if you remember those.  Without the co-processor, trig functions etc were VERY slow because they weren't supported in hardware.  Similar situation here iwth the lack of a FPU in the zaurus - all floating point ops must be emulated in software, using integer arithmetic in the hardware as the 'backend'.

Dave

samxiao

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://
What exactly is "Illegal Instruction"?
« Reply #6 on: November 18, 2004, 12:56:30 am »
Quote
ALU = Arithmetic/Logic Unit, right? (it's been awhile since my comp. architecture class)

Anyway, yes the zaurus processors are able to do arithmetic, but only INTEGER.  They don't support the floating-point (non-integer) instructions natively.  Some ARM processors do, that's why the instructions exist, but not this specific processor.  I guess you could compare it to the old 386 math co-processor, if you remember those.  Without the co-processor, trig functions etc were VERY slow because they weren't supported in hardware.  Similar situation here iwth the lack of a FPU in the zaurus - all floating point ops must be emulated in software, using integer arithmetic in the hardware as the 'backend'.

Dave
like real number? double ?

like 0.05 + 0.999 ?
something like that right?


then i think Motorola 68000 also no

but how those modern processor do float-point calculation?

and how software emulate the float-point if hardware is not available?


sorry.. i'm a curious kid  
Zaurus C1000 (formerly SL5500 and C700)
Cacko developer ROM 1.23 beta + Debian Sarge + X/Qt
1GB Transcend 80x SD (ext2) / 512MB Lexar SD (ext2) / 256MB SanDisk CF(vfat)
Netgear MA701 WiFi CF
Ambicom GPS-CF
Pocketop IR keyboard (has positioning problem with C1000)
Brando LCD screen protector

Apple PowerBook 12" G4 Rev. C + Mac OS X 10.4.x (Tiger)

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
What exactly is "Illegal Instruction"?
« Reply #7 on: November 18, 2004, 07:09:28 am »
Quote
but how those modern processor do float-point calculation?

In software.

Quote
and how software emulate the float-point if hardware is not available?

Google ;-)

Here's a page with a fair bit of info on the IEEE fp standard: http://cch.loria.fr/documentation/IEEE754/

It looks fairly straight forward to implement it in software; it's more difficult to make it very fast :-)

Also try a seach for soft-float (ie: http://www.jhauser.us/arithmetic/SoftFloat.html)


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva