Subject: Re: float and bash was Re: I still want to try 2.1.x kernels!

From: [email-masked] (David Gilbert)
Date: Thu, 30 Jul 1998 17:31:55 +0100

Shaleh wrote:
	Why does bash need floats?  I missed that one.

Nope - I've never figured it out either; it works fine
running a random selection of scripts without it, but
won't run interactivly with it.

Dave

----------------------------------------------------------------------
- Dr. David Alan Gilbert - WARNING! This is a beta release .signature-
- Work:    dg @ cogency.co.uk        - +44-(0)161-428-9444           -
- Home:    gro.gilbert @ treblig.org -                               -
----------------------------------------------------------------------
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Thu, 30 Jul 1998 20:12:50 +0100 (BST)

> won't run interactivly with it.

The reason comes down to the function prologues and epilogues.  If bash
happens to call some function in the C library that could use floats
(eg, printf, scanf), they will attempt to save some of the FP registers.
Hence the problem: no emulator = FP instructions are undefined, and
therefore cause a SIGILL signal to be delivered to the process.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |