lkml.org 
[lkml]   [2003]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Simple patches for Linux as a guest OS in a plex86 VM (please consider)
Humm, that's a good idea.  I already made the mods
to files to add an #include <asm/if.h>. That would
be a logical place to stick such macros. I will
check this out and re-submit the patches if it's
workable.

Maybe this was what Andi meant too. Originally thought
he meant a script file wrapper for gcc.

Will write back soon,
-Kevin

--- Andrew Morton <akpm@digeo.com> wrote:

> I'm wondering if this can this be done a lot more simply with assembler
> macros.
>
> The below example generates the right code. It's then just a matter of
> getting the redefined pushfl and popfl macros into kernel-wide scope.
> Possibly an explicit `-include' in the makefile system.
>
>
> asm("
> .macro popfl
> testl $(1<<9), 0(%esp)
> jz 69003f
> .byte 0x9d # popfl
> sti
> jmp 69004f
> 69003:
> .byte 0x9d # popfl
> cli
> 69004:
> .endm
> ");
>
> foo()
> {
> asm("popfl\n");
> }
>


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.081 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site