-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
This patch adds clobber regs into the play as assembly trashes random registers. I was bitten by this while doing MSR I/O because ECX got corrupted. I attempted to create nice barrier for GCC while changing the stack location too.
The memcpy code was taken from Linux kernel, dont know to whom attribute the copyright on it. If it is OK with the note, otherwise:
Signed-off-by: Rudolf Marek r.marek@assembler.cz
Thanks, Rudolf
2010/2/21 Rudolf Marek r.marek@assembler.cz:
This patch adds clobber regs into the play as assembly trashes random registers. I was bitten by this while doing MSR I/O because ECX got corrupted. I attempted to create nice barrier for GCC while changing the stack location too.
The complex ways in which we have to convince gcc to do __asm__ correctly make me wonder if we shouldn't start putting assembly into assembly into .s files, not .c files. If we have this much trouble with __asm__, how much are we really gaining when we use it? Why not just set up a .s?
ron
Am 22.02.2010 17:31, schrieb ron minnich:
The complex ways in which we have to convince gcc to do __asm__ correctly make me wonder if we shouldn't start putting assembly into assembly into .s files, not .c files. If we have this much trouble with __asm__, how much are we really gaining when we use it? Why not just set up a .s?
romcc in some cases. The other issue is that in an .s file, we're bound to function calling conventions. with __asm__, we can really include code.
Patrick
On Mon, Feb 22, 2010 at 8:34 AM, Patrick Georgi patrick@georgi-clan.de wrote:
The other issue is that in an .s file, we're bound to function calling conventions. with __asm__, we can really include code.
I understand. But I work with a very nice operating system that has never had a need for __asm__, so I question the need for it myself.
I'd still like to see the reason that memset is so slow.
Also, I realize we have dropped support for other architectures, but coreboot is still in principle portable. This change will be the beginning of the removal of the portability. Before we start to make such a change we need to make a conscious decision that losing portability is what we want.
Part of "portability", in this case, is eventually moving to native 64-bit mode for the x86_64. I think we'll have to do that when we have machines with more memory than PAE can address.
thanks
ron
Am 21.02.2010 23:42, schrieb Rudolf Marek:
Hello,
This patch adds clobber regs into the play as assembly trashes random registers. I was bitten by this while doing MSR I/O because ECX got corrupted. I attempted to create nice barrier for GCC while changing the stack location too.
The memcpy code was taken from Linux kernel, dont know to whom attribute the copyright on it. If it is OK with the note, otherwise:
Signed-off-by: Rudolf Marek r.marek@assembler.cz
Acked-by: Patrick Georgi patrick.georgi@coresystems.de
and committed as r5153