| 1 | When building on x32 systems where the default type is 32bit, make sure |
| 2 | we can transparently represent 64bit integers. Otherwise we end up with |
| 3 | build errors like: |
| 4 | /usr/bin/perl asm/ghash-x86_64.pl elf > ghash-x86_64.s |
| 5 | Integer overflow in hexadecimal number at asm/../../perlasm/x86_64-xlate.pl line 201, <> line 890. |
| 6 | ... |
| 7 | ghash-x86_64.s: Assembler messages: |
| 8 | ghash-x86_64.s:890: Error: junk '.15473355479995e+19' after expression |
| 9 | |
| 10 | We don't enable this globally as there are some cases where we'd get |
| 11 | 32bit values interpreted as unsigned when we need them as signed. |
| 12 | |
| 13 | Reported-by: Bertrand Jacquin <bertrand@jacquin.bzh> |
| 14 | URL: https://bugs.gentoo.org/542618 |
| 15 | --- |
| 16 | crypto/perlasm/x86_64-xlate.pl | 4 ++++ |
| 17 | 1 file changed, 4 insertions(+) |
| 18 | |
| 19 | diff --git crypto/perlasm/x86_64-xlate.pl crypto/perlasm/x86_64-xlate.pl |
| 20 | index aae8288..0bf9774 100755 |
| 21 | --- crypto/perlasm/x86_64-xlate.pl |
| 22 | +++ crypto/perlasm/x86_64-xlate.pl |
| 23 | @@ -195,6 +195,10 @@ my %globals; |
| 24 | sub out { |
| 25 | my $self = shift; |
| 26 | |
| 27 | + # When building on x32 ABIs, the expanded hex value might be too |
| 28 | + # big to fit into 32bits. Enable transparent 64bit support here |
| 29 | + # so we can safely print it out. |
| 30 | + use bigint; |
| 31 | if ($gas) { |
| 32 | # Solaris /usr/ccs/bin/as can't handle multiplications |
| 33 | # in $self->{value} |
| 34 | -- |
| 35 | 2.3.3 |
| 36 | |