From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9712101754.AA26889@sauron.zk3.dec.com> Date: Wed, 10 Dec 97 12:54:43 -0500 From: Jerry Feldman Subject: Re: Ieee on linux/alpha In-Reply-To: > Uncle George writes: > > > i get the same results. > > > > it looks like the conversion of double to int is not being handled correctly - namely > > the conversion ( cvttq /c ?) instruction does not have the /s ( software trap > > emulator ) enabled, nor is there a trap instruction after the machine instruction. > > > > this seems to be a compiler bug. Harvey J. Stein wrote: > If it's a compiler bug, then it's also present in egcs-1.0. I just > tested it with egcs, and divide by zero throws a SIGFPE with & without > -mieee, even though I call ieee_set_fp_control(0) before dividing by > zero. I would probably agree here that not having the /s modifier in the cvttq instruction would be a bug if the program is compiled with the ieee option. The trap instruction (eg. trapb) is not always necessary. In the alpha, floating point instructions are followed by a "trap shadow". Essentially, if the floating point instruction causes an exception, the exception is raised several instructions beyond the instruction actually causing the exception. The trapb (trap barrier) effectively causes the processor to wait until all currently pipelined instructions complete. If a compiler places a trapb after each fp instruction, it would guarantee the fp code would be slow. In the newest alpha chips, the trap shadow could possibly contain over 100 instructions. The trap shadow rules are listed in the Alpha Architecture manual. The exception handler has to walk back until it finds the trap causing instruction. +--------------------------------------------------------------------+ Jerry Feldman Digital Unix Development Environment Digital Equipment Corp. (work)gaf@zk3.dec.com (home)gaf@mediaone.net 110 Spitbrook Rd. Mailstop: ZKO3-2/W17 Nashua, NH 03062-9987 (603)884-2970, DTN:264-2970 +--------------------------------------------------------------------+ -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com