Date: Sun, 20 Oct 2002 15:50:14 -0700 (PDT) From: Robert Drehmel <robert@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/syscons sctermvar.h Message-ID: <200210202250.g9KMoEH9087809@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
robert 2002/10/20 15:50:14 PDT
Modified files:
sys/dev/syscons sctermvar.h
Log:
Do not try to work around ``poor (un)sign extension code''
creation by GCC-2.6.3. Casting pointers to unsigned char
to volatile pointers to unsigned char seemed to produce
better results on the ia32 architecture with old versions
of GCC.
The current FreeBSD system compiler GCC-3.2.1 emits
better sign extension code for non-volatile variables:
volatile char c;
int i = c;
is compiled to:
...
movb -1(%ebp), %al
movbsl %al, %eax
movl %eax, -8(%ebp)
...
char c;
int i = c;
is compiled to:
...
movbsl -1(%ebp), %eax
movl %eax, -8(%ebp)
...
The same holds for zero-extension of dereferenced pointers
to volatile unsigned char.
When compiled on alpha or sparc64, the code produced for the
two examples above does not differ.
Revision Changes Path
1.4 +2 -12 src/sys/dev/syscons/sctermvar.h
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210202250.g9KMoEH9087809>
