[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/8] tcg: Add interpreter for bytecode

From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 5/8] tcg: Add interpreter for bytecode
Date: Sun, 18 Sep 2011 07:49:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20110831 Thunderbird/3.1.13

Am 18.09.2011 06:03, schrieb Andi Kleen:
Stefan Weil <address@hidden> writes:
+ switch (opc) {
+ case INDEX_op_end:
+ case INDEX_op_nop:
+ break;

You could probably get some more speed out of this by using a threaded
interpreter with gcc's computed goto extension. That's typically
significantly faster than a plain switch in a loop.

static void *ops[] = {

#define NEXT() goto *ops[*tb_ptr++];



Is there really any difference in the generated code?
gcc already uses a jump table internally to handle the
switch cases.

- Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]