Use non-ambigious assembler syntax. Fix return types. Fix inline usage
to allow building with Clang.
This commit is contained in:
parent
53cb8f8c79
commit
21acee3ad3
9 changed files with 331 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.12 2013/02/08 12:46:14 obache Exp $
|
||||
$NetBSD: distinfo,v 1.13 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
SHA1 (g95-0.93/g95_source.tgz) = b5e503fd6459b65cbda73190685f9490230d9cff
|
||||
RMD160 (g95-0.93/g95_source.tgz) = 98d03e9a1835f4b3553a72a798bdf1d90a757176
|
||||
|
@ -14,7 +14,15 @@ SHA1 (patch-.._gcc-4.0.3_gcc_config_i386_dragonfly64.h) = b228dbcdf7b5cf22d41d6f
|
|||
SHA1 (patch-.._gcc-4.0.3_gcc_config_t-dragonfly) = 9636163ffd359b2a0dbb0a7fec2ca1cf98032c3d
|
||||
SHA1 (patch-.._gcc-4.0.3_gcc_config_t-dragonfly-thread) = a7181b3061e32d3edd38c09eed34232a75de83cf
|
||||
SHA1 (patch-.._gcc-4.0.3_gcc_ginclude_stddef.h) = 5e18b132d36ca02dcfed0569297e7ad6b1eada26
|
||||
SHA1 (patch-.._gcc-4.0.3_gcc_toplev.h) = 164115c81d1a286c139afc652e6e85b2daba9d38
|
||||
SHA1 (patch-ab) = 7275d8df3ba1621f3d496c386df999295f36f974
|
||||
SHA1 (patch-ac) = b20a90cc2f9078cf0048980b75fa6836da0f28a8
|
||||
SHA1 (patch-libf95.a-0.92_configure) = e23998692b410acaabaf24f591b659d2b229bcca
|
||||
SHA1 (patch-libf95.a-0.92_io_atof.c) = 0c3a209815be3a97d984cb9a15ee888f93110d1d
|
||||
SHA1 (patch-libf95.a-0.93_intrinsics_dot__product10.c) = a2fe19bab2a6f719f541692fd4ef7e67766a18e5
|
||||
SHA1 (patch-libf95.a-0.93_intrinsics_matmul10.c) = 30609c3183a98610e4005fd4c0d12cccec0855a1
|
||||
SHA1 (patch-libf95.a-0.93_intrinsics_random.c) = 5445f78b267f742a2bf711aa0f5e06683dda1a68
|
||||
SHA1 (patch-libf95.a-0.93_io_read.c) = 594bcfb15e59dcaaec5a6a21a58af17e8f41eae9
|
||||
SHA1 (patch-libf95.a-0.93_math_ff.c) = 353121bc08a86765d18b0e6f051ba91f7e65e9c2
|
||||
SHA1 (patch-libf95.a-0.93_math_x87.S) = d1eb02bd2358b6abb9b8dc3e32629cba540adcc4
|
||||
SHA1 (patch-libf95.a-0.93_quad_power16.c) = fc7375aa90ecf75bb8ba26d41739614040b16e09
|
||||
|
|
20
lang/g95/patches/patch-.._gcc-4.0.3_gcc_toplev.h
Normal file
20
lang/g95/patches/patch-.._gcc-4.0.3_gcc_toplev.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-.._gcc-4.0.3_gcc_toplev.h,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- ../gcc-4.0.3/gcc/toplev.h.orig 2013-03-01 10:43:23.000000000 +0000
|
||||
+++ ../gcc-4.0.3/gcc/toplev.h
|
||||
@@ -180,13 +180,13 @@ extern int floor_log2 (
|
||||
# define CTZ_HWI __builtin_ctz
|
||||
# endif
|
||||
|
||||
-extern inline int
|
||||
+extern __attribute__((__gnu_inline__)) inline int
|
||||
floor_log2 (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
|
||||
}
|
||||
|
||||
-extern inline int
|
||||
+extern __attribute__((__gnu_inline__)) inline int
|
||||
exact_log2 (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
|
|
@ -0,0 +1,58 @@
|
|||
$NetBSD: patch-libf95.a-0.93_intrinsics_dot__product10.c,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/intrinsics/dot_product10.c.orig 2013-03-01 11:13:24.000000000 +0000
|
||||
+++ libf95.a-0.93/intrinsics/dot_product10.c
|
||||
@@ -225,7 +225,7 @@ char *ap, *bp;
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"movsbl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (bp), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (bp), "m" (temp) : EAX
|
||||
|
||||
#include "dot_product10.c"
|
||||
|
||||
@@ -237,7 +237,7 @@ char *ap, *bp;
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"movswl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (bp), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (bp), "m" (temp) : EAX
|
||||
|
||||
#include "dot_product10.c"
|
||||
|
||||
@@ -247,7 +247,7 @@ char *ap, *bp;
|
||||
"fldt ( %" EAX ")\n" : : "m" (ap) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
- "fild ( %" EAX ")\n" : : "m" (bp), "m" (temp) : EAX
|
||||
+ "filds ( %" EAX ")\n" : : "m" (bp), "m" (temp) : EAX
|
||||
|
||||
#include "dot_product10.c"
|
||||
|
||||
@@ -286,7 +286,7 @@ char *ap, *bp;
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
"movsbl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (ap), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (ap), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" : : "m" (bp) : EAX
|
||||
@@ -299,7 +299,7 @@ char *ap, *bp;
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
"movswl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (ap), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (ap), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" : : "m" (bp) : EAX
|
||||
@@ -309,7 +309,7 @@ char *ap, *bp;
|
||||
#define SUBROUTINE prefix(dot_product_i4_r10)
|
||||
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
- "fild ( %" EAX ")\n" : : "m" (ap), "m" (temp) : EAX
|
||||
+ "filds ( %" EAX ")\n" : : "m" (ap), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" : : "m" (bp) : EAX
|
112
lang/g95/patches/patch-libf95.a-0.93_intrinsics_matmul10.c
Normal file
112
lang/g95/patches/patch-libf95.a-0.93_intrinsics_matmul10.c
Normal file
|
@ -0,0 +1,112 @@
|
|||
$NetBSD: patch-libf95.a-0.93_intrinsics_matmul10.c,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/intrinsics/matmul10.c.orig 2013-03-01 11:13:29.000000000 +0000
|
||||
+++ libf95.a-0.93/intrinsics/matmul10.c
|
||||
@@ -899,7 +899,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"movsbl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
|
||||
#include "matmul10.c"
|
||||
|
||||
@@ -913,7 +913,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"movswl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
|
||||
#include "matmul10.c"
|
||||
|
||||
@@ -925,7 +925,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
"fldt ( %" EAX ")\n" : : "m" (p) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
- "fild ( %" EAX ")\n" : : "m" (q) : EAX
|
||||
+ "filds ( %" EAX ")\n" : : "m" (q) : EAX
|
||||
|
||||
#include "matmul10.c"
|
||||
|
||||
@@ -972,7 +972,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
"movsbl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" : : "m" (q) : EAX
|
||||
@@ -987,7 +987,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
"movswl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" : : "m" (q) : EAX
|
||||
@@ -999,7 +999,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define SUBROUTINE22 prefix(matmul22_i4r10)
|
||||
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
- "fild ( %" EAX ")\n" : : "m" (p), "m" (temp) : EAX
|
||||
+ "filds ( %" EAX ")\n" : : "m" (p), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" : : "m" (q) : EAX
|
||||
@@ -1113,7 +1113,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"movsbl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_RESULT "mov %0, %" EAX "\n" \
|
||||
"fldt (%" EAX ")\n" \
|
||||
@@ -1140,7 +1140,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"movswl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (q), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_RESULT "mov %0, %" EAX "\n" \
|
||||
"fldt (%" EAX ")\n" \
|
||||
@@ -1166,7 +1166,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
: : "m" (p) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
- "fild (%" EAX ")\n" : : "m" (q) : EAX
|
||||
+ "filds (%" EAX ")\n" : : "m" (q) : EAX
|
||||
|
||||
#define LOAD_RESULT "mov %0, %" EAX "\n" \
|
||||
"fldt (%" EAX ")\n" \
|
||||
@@ -1340,7 +1340,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
"movsbl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" \
|
||||
@@ -1368,7 +1368,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
"movswl (%" EAX "), %%eax\n" \
|
||||
"mov %%eax, %1\n" \
|
||||
- "fild %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
+ "filds %1\n" : : "m" (p), "m" (temp) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" \
|
||||
@@ -1394,7 +1394,7 @@ static char matrix_mismatch[] = "Matrix
|
||||
#define SUBROUTINE22 prefix(matmul22_i4z10)
|
||||
|
||||
#define LOAD_A "mov %0, %" EAX "\n" \
|
||||
- "fild (%" EAX ")\n" : : "m" (p) : EAX
|
||||
+ "filds (%" EAX ")\n" : : "m" (p) : EAX
|
||||
|
||||
#define LOAD_B "mov %0, %" EAX "\n" \
|
||||
"fldt ( %" EAX ")\n" \
|
13
lang/g95/patches/patch-libf95.a-0.93_intrinsics_random.c
Normal file
13
lang/g95/patches/patch-libf95.a-0.93_intrinsics_random.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-libf95.a-0.93_intrinsics_random.c,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/intrinsics/random.c.orig 2013-03-01 11:13:35.000000000 +0000
|
||||
+++ libf95.a-0.93/intrinsics/random.c
|
||||
@@ -208,7 +208,7 @@ int scale;
|
||||
harvest[0] = xorshf96();
|
||||
harvest[1] = xorshf96() & 0x7FFFFFFF;
|
||||
|
||||
- asm("fild %0\n"
|
||||
+ asm("filds %0\n"
|
||||
"mov %1, %" EAX "\n"
|
||||
"fildll (%" EAX ")\n"
|
||||
"fscale\n"
|
13
lang/g95/patches/patch-libf95.a-0.93_io_read.c
Normal file
13
lang/g95/patches/patch-libf95.a-0.93_io_read.c
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-libf95.a-0.93_io_read.c,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/io/read.c.orig 2013-03-01 11:14:56.000000000 +0000
|
||||
+++ libf95.a-0.93/io/read.c
|
||||
@@ -102,7 +102,7 @@ void set_real(int value, void *dest, int
|
||||
|
||||
#if HAVE_REAL_10
|
||||
case 10:
|
||||
- asm("fild %0\n"
|
||||
+ asm("filds %0\n"
|
||||
"mov %1, %" EAX "\n"
|
||||
"fstpt (%" EAX ")\n" : : "m" (value), "m" (dest) : EAX);
|
||||
break;
|
31
lang/g95/patches/patch-libf95.a-0.93_math_ff.c
Normal file
31
lang/g95/patches/patch-libf95.a-0.93_math_ff.c
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-libf95.a-0.93_math_ff.c,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/math/ff.c.orig 2013-03-01 11:15:29.000000000 +0000
|
||||
+++ libf95.a-0.93/math/ff.c
|
||||
@@ -790,7 +790,7 @@ int exp;
|
||||
|
||||
exp = *i - 1;
|
||||
|
||||
- asm("fild %0\n" /* i */
|
||||
+ asm("filds %0\n" /* i */
|
||||
"fldt %1\n" /* x : i */
|
||||
"fxtract\n" /* sig(x) : exp(x) : i */
|
||||
"fstp %%st(1)\n" /* sig(x) : i */
|
||||
@@ -961,7 +961,7 @@ int exp;
|
||||
|
||||
exp = *i;
|
||||
|
||||
- asm("fild %0\n"
|
||||
+ asm("filds %0\n"
|
||||
"fldt %1\n"
|
||||
"fscale\n"
|
||||
"fstp %%st(1)\n" : : "m" (exp), "m" (*x));
|
||||
@@ -1069,7 +1069,7 @@ int exp;
|
||||
case FF_REGULAR:
|
||||
exp = MAN10_LEN - 1;
|
||||
|
||||
- asm("fild %0\n" /* p */
|
||||
+ asm("filds %0\n" /* p */
|
||||
"fldt %1\n" /* x . p */
|
||||
"fxam\n"
|
||||
"fnstsw\n"
|
58
lang/g95/patches/patch-libf95.a-0.93_math_x87.S
Normal file
58
lang/g95/patches/patch-libf95.a-0.93_math_x87.S
Normal file
|
@ -0,0 +1,58 @@
|
|||
$NetBSD: patch-libf95.a-0.93_math_x87.S,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/math/x87.S.orig 2013-03-01 11:18:05.000000000 +0000
|
||||
+++ libf95.a-0.93/math/x87.S
|
||||
@@ -250,7 +250,7 @@ PUBLIC(g95_ceiling_1_r10)
|
||||
fldcw (SP)
|
||||
frndint
|
||||
fldcw 4(SP)
|
||||
- fistp (SP)
|
||||
+ fistps (SP)
|
||||
mov (SP), %al
|
||||
SIGNX_AL
|
||||
add $8, SP
|
||||
@@ -266,7 +266,7 @@ PUBLIC(g95_ceiling_2_r10)
|
||||
fldcw (SP)
|
||||
frndint
|
||||
fldcw 4(SP)
|
||||
- fistp (SP)
|
||||
+ fistps (SP)
|
||||
mov (SP), %ax
|
||||
SIGNX_AX
|
||||
add $8, SP
|
||||
@@ -675,7 +675,7 @@ PUBLIC(g95_floor_1_r10)
|
||||
fldcw (SP)
|
||||
frndint
|
||||
fldcw 4(SP)
|
||||
- fistp (SP)
|
||||
+ fistps (SP)
|
||||
mov (SP), %al
|
||||
SIGNX_AL
|
||||
add $8, SP
|
||||
@@ -691,7 +691,7 @@ PUBLIC(g95_floor_2_r10)
|
||||
fldcw (SP)
|
||||
frndint
|
||||
fldcw 4(SP)
|
||||
- fistp (SP)
|
||||
+ fistps (SP)
|
||||
mov (SP), %ax
|
||||
SIGNX_AX
|
||||
add $8, SP
|
||||
@@ -833,7 +833,7 @@ PUBLIC(g95_nint_1_r10)
|
||||
frndint
|
||||
fldcw 4(SP)
|
||||
|
||||
- fistp (SP)
|
||||
+ fistps (SP)
|
||||
movb (SP), %al
|
||||
SIGNX_AL
|
||||
add $8, SP
|
||||
@@ -861,7 +861,7 @@ PUBLIC(g95_nint_2_r10)
|
||||
frndint
|
||||
fldcw 4(SP)
|
||||
|
||||
- fistp (SP)
|
||||
+ fistps (SP)
|
||||
movw (SP), %ax
|
||||
SIGNX_AX
|
||||
add $8, SP
|
17
lang/g95/patches/patch-libf95.a-0.93_quad_power16.c
Normal file
17
lang/g95/patches/patch-libf95.a-0.93_quad_power16.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-libf95.a-0.93_quad_power16.c,v 1.1 2013/03/02 18:05:46 joerg Exp $
|
||||
|
||||
--- libf95.a-0.93/quad/power16.c.orig 2013-03-01 11:16:07.000000000 +0000
|
||||
+++ libf95.a-0.93/quad/power16.c
|
||||
@@ -36,10 +36,11 @@
|
||||
|
||||
#define power_r16_i4 prefix(power_r16_i4)
|
||||
|
||||
+void unpack_quad(void *v, unsigned *mantissa, int *exp, int *sign);
|
||||
|
||||
/* int_power16()-- Core of integer powers. */
|
||||
|
||||
-static int_power16(unpacked16 *base, long long e0, unpacked16 *result) {
|
||||
+static void int_power16(unpacked16 *base, long long e0, unpacked16 *result) {
|
||||
int negative, negative_exp;
|
||||
unsigned long long exp;
|
||||
unpacked16 one;
|
Loading…
Reference in a new issue