|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register
On 18/9/06 12:36, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:
>> Just declare a char-array automatic variable, fill it with machine code, and
>> call it.
>
> Actually, I rather wanted to do static setup as much as possible and hence
> leave only the filling of the actual opcode to be done dynamically (at the
> price of inserting one or two nops).
I think putting the static code in assembly functions and calling out to
them from a dynamically-generated stub of machine code would be neatest.
It doesn't take much C code to generate:
call prologue; in/out; jmp epilogue
That's only about 12 bytes of generated code (assuming call/jmp rel32).
Static calls/jumps are very cheap.
You can define the prologue/epilogue functions within the same .c file
inside globally-defined asm() blocks.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, (continued)
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Keir Fraser
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Jan Beulich
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Keir Fraser
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Jan Beulich
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Keir Fraser
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Jan Beulich
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Keir Fraser
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Jan Beulich
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Keir Fraser
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Jan Beulich
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context,
Keir Fraser <=
- Re: [Xen-devel] [PATCH] enable port accesses with (almost) full register context, Jan Beulich
|
|
|
|
|