Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #274 > unrolled thread
| Started by | Mok-Kong Shen <mok-kong.shen@t-online.de> |
|---|---|
| First post | 2011-09-20 22:44 +0200 |
| Last post | 2011-09-25 17:31 -0400 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.compilers
Any free compilers for 64-bit integer arithmetics? Mok-Kong Shen <mok-kong.shen@t-online.de> - 2011-09-20 22:44 +0200
Re: Any free compilers for 64-bit integer arithmetics? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-09-21 03:28 +0000
Re: Any free compilers for 64-bit integer arithmetics? Robert A Duff <bobduff@shell01.TheWorld.com> - 2011-09-22 10:34 -0400
Re: Any free compilers for 64-bit integer arithmetics? Mok-Kong Shen <mok-kong.shen@t-online.de> - 2011-09-24 11:18 +0200
Re: Any free compilers for 64-bit integer arithmetics? Robert A Duff <bobduff@shell01.TheWorld.com> - 2011-09-25 17:31 -0400
| From | Mok-Kong Shen <mok-kong.shen@t-online.de> |
|---|---|
| Date | 2011-09-20 22:44 +0200 |
| Subject | Any free compilers for 64-bit integer arithmetics? |
| Message-ID | <11-09-024@comp.compilers> |
I want to do unsigned integer arithmetics on 64-bit opearands running on 64-bit Windows. Are there any free compilers of any higher-level language (higher than assembly language) that could be used for that purpose? Thanks. M. K. Shen
[toc] | [next] | [standalone]
| From | glen herrmannsfeldt <gah@ugcs.caltech.edu> |
|---|---|
| Date | 2011-09-21 03:28 +0000 |
| Message-ID | <11-09-025@comp.compilers> |
| In reply to | #274 |
Mok-Kong Shen <mok-kong.shen@t-online.de> wrote: > I want to do unsigned integer arithmetics on 64-bit opearands running > on 64-bit Windows. Are there any free compilers of any higher-level > language (higher than assembly language) that could be used for that > purpose? Thanks. Many compilers will do unsigned (and signed) 64 bit arithmetic even on 32 bit machines. For free compilers, gcc is very popular. Most processors offer addition and subtraction at their native width, multiplication with a double width product, and divide with a double width dividend. If you want more, you, or the library of your compiler, have to combine those as needed. Add, subtract, and multiply are easy, divide is a little harder. Java, also available free, supports a 64 bit type (long). -- glen
[toc] | [prev] | [next] | [standalone]
| From | Robert A Duff <bobduff@shell01.TheWorld.com> |
|---|---|
| Date | 2011-09-22 10:34 -0400 |
| Message-ID | <11-09-026@comp.compilers> |
| In reply to | #274 |
Mok-Kong Shen <mok-kong.shen@t-online.de> writes: > I want to do unsigned integer arithmetics on 64-bit opearands running > on 64-bit Windows. Are there any free compilers of any higher-level > language (higher than assembly language) that could be used for that > purpose? Thanks. All versions of GNAT support 64-bit arithmetic (signed and unsigned), whether or not the hardware directly supports it. - Bob
[toc] | [prev] | [next] | [standalone]
| From | Mok-Kong Shen <mok-kong.shen@t-online.de> |
|---|---|
| Date | 2011-09-24 11:18 +0200 |
| Message-ID | <11-09-030@comp.compilers> |
| In reply to | #276 |
Am 22.09.2011 16:34, schrieb Robert A Duff: > All versions of GNAT support 64-bit arithmetic (signed and unsigned), > whether or not the hardware directly supports it. Thank you very much for the advice. I have just installed the software and I'll start to use it and learn thereby ADA programming which I have postponed due to laziness up till now. I am very happy to know also that it has support for C so that some of my C codes would be reusable. Besides it happens to be my luck that the software is a major new version released only a few months ago. Out of curiosity I have a tiny question: Does the software somehow finds out during installation whether the architecture on which it is installed is 32-bit or 64-bit and correspondingly chooses the most efficient way for machine code generation? M. K. Shen
[toc] | [prev] | [next] | [standalone]
| From | Robert A Duff <bobduff@shell01.TheWorld.com> |
|---|---|
| Date | 2011-09-25 17:31 -0400 |
| Message-ID | <11-09-031@comp.compilers> |
| In reply to | #280 |
Mok-Kong Shen <mok-kong.shen@t-online.de> writes: > Am 22.09.2011 16:34, schrieb Robert A Duff: > >> All versions of GNAT support 64-bit arithmetic (signed and unsigned), >> whether or not the hardware directly supports it. > > Thank you very much for the advice. You're welcome. >...I have just installed the software > and I'll start to use it and learn thereby ADA programming which I have > postponed due to laziness up till now. I am very happy to know also > that it has support for C so that some of my C codes would be reusable. Right. GNAT is part of gcc (the Ada part). gcc also compiles C, C++, and several other languages. I suspect it supports 64-bit arithmetic for all languages, but I'm not sure. You can buy support for gcc Ada (and C, etc) from AdaCore, which is my employer. Or you can use the free software version, if you're a hobbyist who doesn't need support. If you are interested in mixing Ada and C in the same program, you should look at the section "Generating Ada Bindings for C and C++ headers" in the documentation. There is also support for mixing Ada and C++, with cross-language method overriding. > Besides it happens to be my luck that the software is a major new > version released only a few months ago. > > Out of curiosity I have a tiny question: Does the software somehow > finds out during installation whether the architecture on which it is > installed is 32-bit or 64-bit and correspondingly chooses the most > efficient way for machine code generation? No. If you install a binary package, you have to pick one, which is specific to some hardware and some operating system. If you pick the linux x86-64 version, for example, it will generate 64-bit code, which will work only on x86-64 linux. If you pick the linux x86 version, it will generate 32-bit code, which will work on both 32-bit and 64-bit hardware, on linux. And there are versions for windows and vxworks (cross compiler) and SPARC and power PC and so forth. If you build from sources, you can configure it for your system. But it's pretty complicated. - Bob
[toc] | [prev] | [standalone]
Back to top | Article view | comp.compilers
csiph-web