lkml.org 
[lkml]   [1998]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH] APM support doesn't compile with binutils 2.8.1.0.24
According to the binutils people, it's related to bogus asm in apm_bios.c
- the patch I've attached fixes it.

LLaP
bero

---------- Forwarded message ----------
Date: Wed, 25 Mar 1998 12:49:11 +1030 (CST)
From: Alan Modra <alan@spri.levels.unisa.edu.au>
To: Ian Lance Taylor <ian@cygnus.com>
Cc: bero@linux.net.eu.org
Subject: Re: [bero@linux.net.eu.org: binutils 2.8.1.0.24 broken]
>
> This would seem to be the result of the patch you sent to me a week or
> two ago. I think that H.J. incorporated it into binutils 2.8.1.0.24.

Yes, HJ did incorporate the patch, and it does look like my patch is
causing gas to complain.

> Do you have any idea what is going on here? Do you think it is
> unrelated?

There's quite a lot of assembler in apm_bios.c. gas is complaining
about `pushl %%gs', `popl %%gs' and other similar push and pops of
segment registers. If these asm statements are changed to omit the
`l' suffix, ie. `push %%gs', the problem will go away.

Bernhard, would you edit the macros APM_DO_ZERO_SEGS, and
APM_DO_RESTORE_SEGS in apm_bios.c to remove the `l' suffix, and
recompile?

I've grepped over the rest of linux-2.1.90, and can't find any other
occurence of these bogus instructions.

>
> Could you send me a test case for your patch?

The point of my patch was to remove the extraneous prefix byte
emitted by instructions like the following.

.text
mov %dx,%ds
mov 0,%es
mov %gs,0
mov %fs,%ax
>
> The patch I mean is this one:
>
> 1998-03-15 Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
>
> * config/tc-i386.c (md_assemble): Add no_word_prefix_needed
> variable and don't emit a data-size prefix byte for segment
> register or control/debug register moves. Check for incorrect
> suffix on these instructions too.
>
> Ian
>
> ------- Start of forwarded message -------
> Date: Tue, 24 Mar 1998 12:50:19 +0100 (CET)
> From: Bernhard Rosenkraenzer <bero@linux.net.eu.org>
> X-Sender: bero@k6.bero
> To: bug-gnu-utils@gnu.org
> Subject: binutils 2.8.1.0.24 broken
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> Hello,
> while trying to compile the Linux 2.1.90 kernel on an ix86 system after
> updating to binutils 2.8.1.0.24, I get a lot of "register does not match
> opcode suffix" errors - 2.8.1.0.23 (with same kernel/compiler) works fine.
>
> If you need it, I can send you a precompiled apm_bios.i file (44k
> gzip'ed).
>
> gcc -D__KERNEL__ -I/UW-SCSI/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fomit-frame-pointer -fno-exceptions -mamdk6 -DCPU=686 -DEXPORT_SYMTAB -c apm_bios.c
> /UW-SCSI/linux/include/asm/string.h: In function `__constant_memcpy':
> In file included from /UW-SCSI/linux/include/linux/string.h:39,
> from /UW-SCSI/linux/include/linux/signal.h:64,
> from /UW-SCSI/linux/include/linux/sched.h:22,
> from /UW-SCSI/linux/include/asm/uaccess.h:7,
> from apm_bios.c:80:
> /UW-SCSI/linux/include/asm/string.h:448: warning: control reaches end of non-void function
> /UW-SCSI/linux/include/asm/string.h: In function `__constant_c_and_count_memset':
> /UW-SCSI/linux/include/asm/string.h:599: warning: control reaches end of non-void function
> apm_bios.c: At top level:
> apm_bios.c:520: warning: `apm_get_battery_status' defined but not used
> {standard input}: Assembler messages:
> {standard input}:171: Error: register does not match opcode suffix
> {standard input}:172: Error: register does not match opcode suffix
> {standard input}:173: Error: register does not match opcode suffix
> {standard input}:174: Error: register does not match opcode suffix
> {standard input}:185: Error: register does not match opcode suffix
> {standard input}:186: Error: register does not match opcode suffix
> {standard input}:187: Error: register does not match opcode suffix
> {standard input}:188: Error: register does not match opcode suffix
> {standard input}:217: Error: register does not match opcode suffix
> {standard input}:218: Error: register does not match opcode suffix
> {standard input}:219: Error: register does not match opcode suffix
> {standard input}:220: Error: register does not match opcode suffix
> {standard input}:231: Error: register does not match opcode suffix
> {standard input}:232: Error: register does not match opcode suffix
> {standard input}:233: Error: register does not match opcode suffix
> {standard input}:234: Error: register does not match opcode suffix
> {standard input}:275: Error: register does not match opcode suffix
> {standard input}:276: Error: register does not match opcode suffix
> {standard input}:277: Error: register does not match opcode suffix
> {standard input}:278: Error: register does not match opcode suffix
> {standard input}:289: Error: register does not match opcode suffix
> {standard input}:290: Error: register does not match opcode suffix
> {standard input}:291: Error: register does not match opcode suffix
> {standard input}:292: Error: register does not match opcode suffix
> {standard input}:320: Error: register does not match opcode suffix
> {standard input}:321: Error: register does not match opcode suffix
> {standard input}:322: Error: register does not match opcode suffix
> {standard input}:323: Error: register does not match opcode suffix
> {standard input}:334: Error: register does not match opcode suffix
> {standard input}:335: Error: register does not match opcode suffix
> {standard input}:336: Error: register does not match opcode suffix
> {standard input}:337: Error: register does not match opcode suffix
> {standard input}:399: Error: register does not match opcode suffix
> {standard input}:400: Error: register does not match opcode suffix
> {standard input}:401: Error: register does not match opcode suffix
> {standard input}:402: Error: register does not match opcode suffix
> {standard input}:413: Error: register does not match opcode suffix
> {standard input}:414: Error: register does not match opcode suffix
> {standard input}:415: Error: register does not match opcode suffix
> {standard input}:416: Error: register does not match opcode suffix
> {standard input}:1886: Error: register does not match opcode suffix
> {standard input}:1887: Error: register does not match opcode suffix
> {standard input}:1888: Error: register does not match opcode suffix
> {standard input}:1889: Error: register does not match opcode suffix
> {standard input}:1900: Error: register does not match opcode suffix
> {standard input}:1901: Error: register does not match opcode suffix
> {standard input}:1902: Error: register does not match opcode suffix
> {standard input}:1903: Error: register does not match opcode suffix
> {standard input}:2044: Error: register does not match opcode suffix
> {standard input}:2045: Error: register does not match opcode suffix
> {standard input}:2046: Error: register does not match opcode suffix
> {standard input}:2047: Error: register does not match opcode suffix
> {standard input}:2058: Error: register does not match opcode suffix
> {standard input}:2059: Error: register does not match opcode suffix
> {standard input}:2060: Error: register does not match opcode suffix
> {standard input}:2061: Error: register does not match opcode suffix
> make[3]: *** [apm_bios.o] Error 1
> make[3]: Leaving directory `/UW-SCSI/linux/drivers/char'
> make[2]: *** [first_rule] Error 2
> make[2]: Leaving directory `/UW-SCSI/linux/drivers/char'
> make[1]: *** [sub_dirs] Error 2
> make[1]: Leaving directory `/UW-SCSI/linux/drivers'
> make: *** [linuxsubdirs] Error 2
> ------- End of forwarded message -------
>



--655616-856243370-890836401=:209
Content-Type: APPLICATION/octet-stream; name="APM-2.8.1.0.24.diff.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.96.980325153321.209B@k6.bero>
Content-Description: Fix for apm_bios-c

H4sICDsUGTUCA0FQTS0yLjguMS4wLjI0LmRpZmYAfdLfa8IwEAfw5/SvOBSf
YoYN+2F9qmDxSTragTAKxZmLK2hTzDZ82t++LC21xdSng8/3SC5HGGOwq075
R6H0w/6XbFHAZncGfw7+42L2suAB+EEw9yilnca2jz/ZvsC01n1hCIzz5ymf
AW1qGHowxlIU0tRCCpSwfN3k71ES52m0To0Sg0WJ1lfxNSKZxwgZVd/68wiT
idBZmX2NoK/oVOnUQ6u00d6xHUQXShdezwSDF3W2Q4nLtC7d8KR+/u+zkdBD
CQ4mcjBphrjdZRKlb3ES9dapqv4uOihdiC5s5q83oarb5VqTDkOHiXZ+PGq8
8yXuv9D7AxYw/O/RAgAA
--655616-856243370-890836401=:209--


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site