gnu software bugs

2013-11-02 Thread Mischa Baars
Hi, I found these two small bugs in the gnu software. Anyone who would like to try to fix these? Regards, Mischa. 2013101700 - gnu software bugs.tar.bz2 Description: application/bzip

gnu software bugs - shift left

2013-11-02 Thread Mischa Baars
3 07:10 PM, Dan Kegel wrote: Please don't crosspost. It would probably also help if you posted just one bug per message, and included the commandline, source, and error message for your smallest test case inline, and used a more descriptive subject line. On Sat, Nov 2, 2013 at 10:26 AM, Misc

gnu software bugs - long double

2013-11-02 Thread Mischa Baars
3 07:10 PM, Dan Kegel wrote: Please don't crosspost. It would probably also help if you posted just one bug per message, and included the commandline, source, and error message for your smallest test case inline, and used a more descriptive subject line. On Sat, Nov 2, 2013 at 10:26 AM, Misc

Re: gnu software bugs - shift left

2013-11-02 Thread Mischa Baars
On 11/02/2013 07:52 PM, Ian Lance Taylor wrote: On Sat, Nov 2, 2013 at 11:31 AM, Mischa Baars wrote: Here's the examples again, now each bug in a separate file. Hope it helps... Just compile with 'make' and run the executable. The source code is documented, so any questions

Re: gnu software bugs - long double

2013-11-02 Thread Mischa Baars
On 11/02/2013 07:57 PM, Ian Lance Taylor wrote: On Sat, Nov 2, 2013 at 11:31 AM, Mischa Baars wrote: Here's the examples again, now each bug in a separate file. Hope it helps... Just compile with 'make' and run the executable. The source code is documented, so any questions

Re: gnu software bugs - shift left

2013-11-02 Thread Mischa Baars
On 11/02/2013 08:17 PM, Jonathan Wakely wrote: On 2 November 2013 18:57, Mischa Baars wrote: I understand, however it seems more logical to use the destination type to determine the type of the first and second operand. Are you completely sure this is the desired behaviour? It's the beha

Re: gnu software bugs - long double

2013-11-02 Thread Mischa Baars
On 11/02/2013 08:28 PM, Jonathan Wakely wrote: On 2 November 2013 18:59, Mischa Baars wrote: On 11/02/2013 07:57 PM, Ian Lance Taylor wrote: On Sat, Nov 2, 2013 at 11:31 AM, Mischa Baars wrote: Here's the examples again, now each bug in a separate file. Hope it helps... Just compile

Re: gnu software bugs - long double

2013-11-02 Thread Mischa Baars
On 11/02/2013 08:28 PM, Jonathan Wakely wrote: On 2 November 2013 18:59, Mischa Baars wrote: On 11/02/2013 07:57 PM, Ian Lance Taylor wrote: On Sat, Nov 2, 2013 at 11:31 AM, Mischa Baars wrote: Here's the examples again, now each bug in a separate file. Hope it helps... Just compile

Re: gnu software bugs - long double

2013-11-02 Thread Mischa Baars
On 11/02/2013 09:11 PM, David Given wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/11/13 19:48, Mischa Baars wrote: [...] I have written a couple of new trigonometric functions for use in the library, and actually I need this to function properly. The point is that 1.1 simply

Re: gnu software bugs - long double

2013-11-02 Thread Mischa Baars
On 11/02/2013 11:06 PM, Jonathan Wakely wrote: On 2 November 2013 21:52, Mischa Baars wrote: You are mistaken :) Indeed some rational numbers can only be represented up to a certain number of bits, like 1 / 3. Others can be exactly represented, like 1 / 8. All real numbers, and therefore all

Re: gnu software bugs - long double

2013-11-02 Thread Mischa Baars
On 11/02/2013 11:19 PM, Jonathan Wakely wrote: On 2 November 2013 22:12, Mischa Baars wrote: On 11/02/2013 11:06 PM, Jonathan Wakely wrote: On 2 November 2013 21:52, Mischa Baars wrote: You are mistaken :) Indeed some rational numbers can only be represented up to a certain number of bits

Re: gnu software bugs - long double

2013-11-03 Thread Mischa Baars
On 11/03/2013 12:29 AM, Rob wrote: Sat, Nov 02, 2013, Mischa Baars: On 11/02/2013 11:19 PM, Jonathan Wakely wrote: On 2 November 2013 22:12, Mischa Baars wrote: And 1.1 is not representable as long double. If you are willing to stop being so arrogant for a few minutes and learn something try

unsigned integers and the calculation of PI

2012-10-09 Thread Mischa Baars
Hi All, I'm trying to verify the 'fldpi' instruction on the Intel Processor. Hope you would like to have a look at the following piece of example code? Best Regards, Mischa. http://www.cyberfiber.org/sites/default/files/2012020314%20-%20algorithms%20on%20the%20intel%20processor%20-%20unsigned

Passing 64-bit function arguments to assembler

2012-10-12 Thread Mischa Baars
Hi, Here's a possible bug in the compiler: As can be seen from the objdump output, 64-bit arguments are passed in 32-bit registers 0040049c : 40049c:55 push rbp 40049d:48 89 e5 movrbp,rsp 4004a0:be 44 44 00 00 mov

macro's and local variables

2012-10-12 Thread Mischa Baars
Hi All, Who can take a first look at this in the morning? Thanks, Mischa. function.o: file format elf64-x86-64 Disassembly of section .text: : 0: c3 ret function.o: file format elf64-x86-64 Disassembly of section .text: 0

Re: macro's and local variables

2012-10-15 Thread Mischa Baars
03 AM, Jonathan Wakely wrote: On 12 October 2012 22:43, Mischa Baars wrote: Hi All, Who can take a first look at this in the morning? Hi, I looked, they seem to be some files. Nice. If you want people to look at them properly you should probably send them to the gcc-help list and explain why you

macro's and arguments

2012-10-16 Thread Mischa Baars
Hi, Who will be fixing this? Macro arguments without brackets are not accepted by the assembler. If I can be of any help, let me know. Thanks, Mischa.

macro's and arguments

2012-10-16 Thread Mischa Baars
Hi, Who will be fixing this? Macro arguments without brackets are not accepted by the assembler. If I can be of any help, let me know. Thanks, Mischa. .intel_syntax noprefix .global function .code64 .macro A a

website update

2012-10-27 Thread Mischa Baars
Hi, I just wanted to let you know, I've updated my website at: http://www.cyberfiber.org, hope you don't mind me notifying you. Hope you people can fine-tune both the compiler and the assembler during development, otherwise I will have to migrate to Microsoft Windows in the near future. Le

calculation of pi

2012-11-02 Thread Mischa Baars
Hi, I have been writing this piece of example code, but it seems that someone has been modifying the compiler in the meantime such that arguments are now passed in xmm registers instead of over the stack. Also the npx top of stack pointer isn't handled alike for all three different types of r

Re: calculation of pi

2012-11-03 Thread Mischa Baars
On 11/02/2012 07:11 PM, Ian Lance Taylor wrote: On Fri, Nov 2, 2012 at 8:13 AM, Mischa Baars wrote: I have been writing this piece of example code, but it seems that someone has been modifying the compiler in the meantime such that arguments are now passed in xmm registers instead of over the

Re: calculation of pi

2012-11-03 Thread Mischa Baars
On 11/02/2012 07:11 PM, Ian Lance Taylor wrote: On Fri, Nov 2, 2012 at 8:13 AM, Mischa Baars wrote: I have been writing this piece of example code, but it seems that someone has been modifying the compiler in the meantime such that arguments are now passed in xmm registers instead of over the

Re: calculation of pi

2012-11-03 Thread Mischa Baars
On 11/03/2012 12:41 PM, Tim Prince wrote: On 11/3/2012 3:32 AM, Mischa Baars wrote: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory which also prevents me from compiling the compiler under Fedora 17. This means that I am both not able to compile

Re: calculation of pi

2012-11-04 Thread Mischa Baars
On 11/04/2012 02:45 AM, Ian Lance Taylor wrote: On Sat, Nov 3, 2012 at 12:55 AM, Mischa Baars wrote: On 11/02/2012 07:11 PM, Ian Lance Taylor wrote: On Fri, Nov 2, 2012 at 8:13 AM, Mischa Baars wrote: I have been writing this piece of example code, but it seems that someone has been

Re: calculation of pi

2012-11-05 Thread Mischa Baars
On 11/05/2012 05:55 AM, Ian Lance Taylor wrote: On Sun, Nov 4, 2012 at 1:34 AM, Mischa Baars wrote: On 11/04/2012 02:45 AM, Ian Lance Taylor wrote: There is no "original." The 32-bit and 64-bit ABIs are different. The 64-bit ABI has always passed arguments in registers. There is

Re: calculation of pi

2012-11-06 Thread Mischa Baars
On 11/05/2012 12:26 PM, David Brown wrote: On 05/11/2012 11:33, Mischa Baars wrote: On 11/05/2012 05:55 AM, Ian Lance Taylor wrote: On Sun, Nov 4, 2012 at 1:34 AM, Mischa Baars wrote: On 11/04/2012 02:45 AM, Ian Lance Taylor wrote: There is no "original." The 32-bit and 64-bi

bug report: not-a-number not recognized when compiling for x86_64

2013-01-14 Thread Mischa Baars
Hi, When running the example attached, you can see the compiler fails to recognize not-a-number's properly. Anyone who would like to have a look? Regards, Mischa. #include #include int main() { double x = NAN; if (x == NAN) { printf("found a not-a-number\n"); } return; }

Re: bug report: not-a-number not recognized when compiling for x86_64

2013-01-15 Thread Mischa Baars
On 01/14/2013 03:50 PM, Marc Glisse wrote: On Mon, 14 Jan 2013, Mischa Baars wrote: When running the example attached, you can see the compiler fails to recognize not-a-number's properly. Bug reports go to bugzilla. NaN doesn't compare equal to anything. x==x is actually the usu

not-a-number's

2013-01-15 Thread Mischa Baars
This is what I was trying to point out: When disregarding the 'isnan()', the function is returning a '2' when one or both the arguments is a NaN. Do you suppose this is correct? If you ask me, it should exit on the first compare and thus return a not-a-number. Regards, Mischa. 2010100706

Re: not-a-number's

2013-01-15 Thread Mischa Baars
On 01/15/2013 05:24 PM, Eric Botcazou wrote: When disregarding the 'isnan()', the function is returning a '2' when one or both the arguments is a NaN. Do you suppose this is correct? If you ask me, it should exit on the first compare and thus return a not-a-number. You cannot "exit" a compariso

Re: not-a-number's

2013-01-15 Thread Mischa Baars
On 01/15/2013 05:24 PM, Eric Botcazou wrote: When disregarding the 'isnan()', the function is returning a '2' when one or both the arguments is a NaN. Do you suppose this is correct? If you ask me, it should exit on the first compare and thus return a not-a-number. You cannot "exit" a compariso

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 09:14 AM, Andreas Schwab wrote: Mischa Baars writes: Furthermore, since 'fxam' will return a 'non-comparable' during the first compare, I suppose the function should then enter the first 'else' and return a '4'. Non-comparable means

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 08:57 AM, Eric Botcazou wrote: Well, I have an Intel manual here that states that any operation on a QNaN should return a QNaN, which means that also the compare should return a QNaN when one or both of the arguments is a QNaN. No, that isn't how comparisons work. The correct resu

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 10:06 AM, Andreas Schwab wrote: Mischa Baars writes: This means that the first 'if' statement should have been terminated when There is no such thing as a "terminated statement". The first condition evaluates to true. Whatever you want, although personall

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 12:07 PM, Andrew Haley wrote: On 01/16/2013 09:27 AM, Mischa Baars wrote: On 01/16/2013 10:06 AM, Andreas Schwab wrote: Mischa Baars writes: This means that the first 'if' statement should have been terminated when There is no such thing as a "terminated s

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 12:07 PM, Andrew Haley wrote: On 01/16/2013 09:27 AM, Mischa Baars wrote: On 01/16/2013 10:06 AM, Andreas Schwab wrote: Mischa Baars writes: This means that the first 'if' statement should have been terminated when There is no such thing as a "terminated s

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 01:04 PM, Robert Dewar wrote: On 1/16/2013 6:54 AM, Mischa Baars wrote: ] And indeed apparently the answer then is '2'. However, I don't think this is correct. If that means that there is an error in the C specification, then there probably is an error in the speci

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 01:28 PM, Robert Dewar wrote: On 1/16/2013 7:10 AM, Mischa Baars wrote: And as I have said before: if you are satisfied with the answer '2', then so be it and you keep the compiler the way it is, personally I'm am not able to accept changes to the sources anyway. I

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 02:53 PM, Richard Biener wrote: On Wed, Jan 16, 2013 at 1:52 PM, Mischa Baars wrote: On 01/16/2013 01:28 PM, Robert Dewar wrote: On 1/16/2013 7:10 AM, Mischa Baars wrote: And as I have said before: if you are satisfied with the answer '2', then so be it and yo

Re: not-a-number's

2013-01-16 Thread Mischa Baars
On 01/16/2013 07:23 PM, David Paterson wrote: -Original Message- From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of Mischa Baars Sent: 16 January 2013 12:53 To: Robert Dewar; gcc@gcc.gnu.org Subject: Re: not-a-number's On 01/16/2013 01:28 PM, Robert Dewar wrote

Re: not-a-number's

2013-01-17 Thread Mischa Baars
On 01/17/2013 01:08 PM, Gabriel Paubert wrote: On Thu, Jan 17, 2013 at 12:21:04PM +0100, Vincent Lefevre wrote: On 2013-01-17 06:53:45 +0100, Mischa Baars wrote: Also this was not what I intended to do, I was trying to work with quiet not-a-numbers explicitly to avoid the 'invalid oper

Re: not-a-number's

2013-01-17 Thread Mischa Baars
On 01/17/2013 04:33 PM, Mischa Baars wrote: On 01/17/2013 01:08 PM, Gabriel Paubert wrote: On Thu, Jan 17, 2013 at 12:21:04PM +0100, Vincent Lefevre wrote: On 2013-01-17 06:53:45 +0100, Mischa Baars wrote: Also this was not what I intended to do, I was trying to work with quiet not-a-numbers

Re: not-a-number's

2013-01-17 Thread Mischa Baars
On 01/17/2013 04:46 PM, Vincent Lefevre wrote: On 2013-01-17 16:33:56 +0100, Mischa Baars wrote: Actually it is the correct way, as long as you stick to the conventions. A QNaN is not supposed to change into anything, also not with the pow(). Only the other way around. Normal numbers can change

Re: Components no longer exist

2013-01-17 Thread Mischa Baars
On 01/17/2013 04:48 PM, Michael Witten wrote: The documentation here: http://gcc.gnu.org/install/download.html says: It is possible to download a full distribution or specific components... If you choose to download specific components, you must download the core GCC distributio

Re: Components no longer exist

2013-01-17 Thread Mischa Baars
On 01/17/2013 04:48 PM, Michael Witten wrote: The documentation here: http://gcc.gnu.org/install/download.html says: It is possible to download a full distribution or specific components... If you choose to download specific components, you must download the core GCC distributio

Re: Components no longer exist

2013-01-17 Thread Mischa Baars
On 01/17/2013 06:23 PM, Jonathan Wakely wrote: On 17 January 2013 15:48, Michael Witten : The documentation here: http://gcc.gnu.org/install/download.html says: It is possible to download a full distribution or specific components... If you choose to download specific components,

Re: Components no longer exist

2013-01-17 Thread Mischa Baars
On 01/17/2013 06:31 PM, Jonathan Wakely wrote: On 17 January 2013 17:29, Mischa Baars wrote: On 01/17/2013 06:23 PM, Jonathan Wakely wrote: On 17 January 2013 15:48, Michael Witten : The documentation here: http://gcc.gnu.org/install/download.html says: It is possible to download

Re: Components no longer exist

2013-01-17 Thread Mischa Baars
On 01/17/2013 07:40 PM, Jonathan Wakely wrote: On 17 January 2013 17:48, Mischa Baars wrote: Indeed I am, I thought you were trying to say that gcc-x.y.z.tar.gz has missing components. I had some trouble compiler: unable to compute suffix for object files, but now it seems to work?! Did you