This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: Binutils 2.15.97 available
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Dave Korn'" <dave dot korn at artimi dot com>,"'Etienne Lorrain'" <etienne_lorrain at yahoo dot fr>,"'Nick Clifton'" <nickc at redhat dot com>
- Cc: <binutils at sources dot redhat dot com>,<drow at false dot org>
- Date: Mon, 25 Apr 2005 16:58:36 +0100
- Subject: RE: Binutils 2.15.97 available
----Original Message----
>From: Dave Korn
>Sent: 25 April 2005 16:45
> ----Original Message----
>> From: Etienne Lorrain
>> Sent: 25 April 2005 16:04
>>> asm volatile (" dataPS2 = %c0 ": : "i" (&MOUSE.data.PS2));
>
> IIUIC, all you want to do here is initialise an assembler-level variable
> with the address of MOUSE.data.PS2 at runtime, yes?
BTW, whatever way you do it, I just noticed this bit that confused me:
> asm (
> "PS2_mouse_callback:
> \n" " .extern _dataPS2
> \n" " movl %eax,_dataPS2
> \n" " movl 16(%esp),%eax
> \n" " movl %eax,_dataPS2 + 4
Shouldn't those be indirect references, if dataPS2 contains a pointer to
the MOUSE structure? I.e. "movl %eax,[_dataPS2]" and "movl
%eax,4[_dataPS2]"? The way you have it to start with reads to me as if
you're overwriting the value of the pointer variable and the next 4 bytes
after it. I may just be misunderstanding AT+T syntax, though, I only speak
intel myself.....
cheers,
DaveK
--
Can't think of a witty .sigline today....