www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/03/08/12:37:27

Date: Mon, 8 Mar 1999 12:32:40 -0500
From: "I treat her like a lady..." <trn AT trn DOT nu>
To: pgcc AT delorie DOT com
Subject: Miscompilation of Linux 2.2.2i-ac7 w/ FPU memcpy().
Message-ID: <19990308123240.A30623@waea.trn.nu>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.4i
Reply-To: pgcc AT delorie DOT com

--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

gcc version pgcc-2.93.09 19990221 (gcc2 ss-980929 experimental)
Retrieved from CVS, compiled with gcc 2.7.2.3 with -O.

Kernel 2.2.2i (ftp.kerneli.org) with a few patches:
	Fast Pentium FPU memcpy() patch. (2.2.0a)
	Alan Cox's 2.2.2ac7 patch.
	DECnet Socket Layer v0.0.10.
	LinuxLVM 0.6.
	as well as a few custom tweaking's here and there
		that are irrelevant, in the network layer.

GNU BinUtils 2.9.1.0.21

GNU Glibc2 2.1 (from ftp.funet.fi) with glibc-2.1 headers.

This is my first attempt at compiling the Linux kernel after
updating from pgcc-1.1.1.  I updated mainly for the MMX support
and reading the assembly output to try to teach myself a little
about MMX.  I'm compiling to kernel to update from LVM 0.5 to
LVM 0.6.  The file that it's having problems with is:
/usr/src/linux/mm/filemap.c, the exact error being:

filemap.c: In function `sys_sendfile':
filemap.c:911: impossible register constraint in `asm'
filemap.c:911: impossible register constraint in `asm'
filemap.c:911: impossible register constraint in `asm'
/usr/src/linux/include/asm/uaccess.h: In function=20
	`__generic_copy_to_user_nocheck':
/usr/src/linux/include/asm/uaccess.h:351: Invalid `asm' statement:
/usr/src/linux/include/asm/uaccess.h:351: fixed or forbidden register 4=20
	(si) was spilled for class SIREG.

I'm compiling this particular file with optimiztions disabled, using the
lowest compatible CPU type (-O0 -pipe -fno-strength-reduce -g0 -DCPU=3D386=
=20
-m386 -march=3Di386).  Using higher optimizations or CPU instruction levels
gives different similar errors.  The function in question in uaccess.h
is as follows:

static inline unsigned long
__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n)
{
        __copy_user(to,from,n);
        return n;
}

Also, unable to compile is the CAST encryption driver from the Linux
International patch available from ftp.kerneli.org/pub/kerneli/v2.2,
but since I'm not using that driver, I'm not experiencing problems.

IMPORTANT, PLEASE NOTE:
I'm not on the mailing list, so I would appreciate if relevant=20
discussion be Cc:'d to my personal e-mail address.  Thanks in advance.

*GRRR*, IMPORTANT UPDATE, PS:

	Well, maybe I wrote the above too soon, but I'm glad I didn't
hit then send button quite as soon as I normally would of.  The problem
seems to only manifest itself when compiling against the Fast Pentium
FPU memcpy() patch.  I'll live without it since it doesn't improve=20
performance that greatly on Pentium-II systems, however, if someone
more knowledgeable than myself in assembly would like it investigate the
issue, the patch is available at http://www.tiac.net/users/rlk/linux.html.
I just went back and modified the subject header so it's on-topic with the
note your reading now.  Hopefully the patch can be made compatible.

Offending code in the P5 memcpy patch begins at line 698.

I appreciate the help in advance.  Please kindly ignore this message if
I'm bringing up a known issue or if this is a FAQ.  Thanks.

In the meantime I'll checkout and recompile pgcc from CVS, and try
compilation against a 2.2.3-prerelease with the same patches.

--=20
Jeff Johnson, <trn AT trn DOT nu>, UIN: 30121039, AIM: TrNSZ
"To me, clowns aren't funny.  I think it goes back to
the time at the circus when the clown killed my dad."

--jRHKVT23PllUwdXP
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3n
Comment: Requires PGP version 2.6.3(i)n or higher.

iQEVAwUBNuQJuJkrlaDVjUu5AQFCEggAt2+suQsXAGbLmAaBzERakgXum6CX/lNS
JN3lVojvrC+ou8Cyl+37FWNzb4Bz4MQR6JK/NIBiqPVZ/YgBVnO32fQabpNzd/hA
l3EFvc4AcJs8av3qKRWpGN2S1WXHn9sfSIwP+/sPljUcPxku/hInuPQDWXmUKHnC
IMrjZ4xh3aOkFwTKNb022gADKN3eHaXPVZqX/zUmbO/nLEpC+eVyahaaHQ+RR4G1
IYRK9mWKiOb20sD+9a0WodBsX9VzJDKR0iZr8xOTWhGuRQikog/0Fq+HQUreZra1
nv/Dff9Bvuw7XxDVnwFpkWbbyqaECRTTYk7gxZdEd+Xg/crxeJs72w==
=h/X5
-----END PGP SIGNATURE-----

--jRHKVT23PllUwdXP--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019