[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: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 5/8] tcg: Add interpreter for bytecode
Date: Sun, 18 Sep 2011 20:54:35 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2

On 09/18/2011 10:22 AM, Paolo Bonzini wrote:
On 09/18/2011 07:49 AM, Stefan Weil wrote:
Is there really any difference in the generated code?
gcc already uses a jump table internally to handle the
switch cases.

You typically save something on range checks, and it enables a lot more tricks for use later (e.g. using multiple jump tables to perform simple peephole optimizations, or to divert code execution on interrupts).

I think it also improves branch target prediction - if you have a tight loop of a few opcodes the predictor can guess where you're headed (since there is a separate lookup key for each opcode), whereas with the original code, there's a single key which cannot be used to predict the branch target.

error compiling committee.c: too many arguments to function

reply via email to

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