On 04/07/2016 01:37 PM, Stefan Weil wrote:
I just tested a variant with tcg_debug_assert. It creates less efficient
code when debugging is disabled. Here is the code size for x86_64:

with normal tcg_debug_assert:

    text       data        bss        dec        hex    filename
    8293          0        128       8421       20e5
bin/ndebug/x86_64-linux-gnu,tci/x86_64-softmmu/tci.o

In gdb I can also see assembler code for op_size at the beginning
of the for loop in tcg_qemu_tb_exec. This slows down the interpreter.

Please file a gcc bug.

A branch across __builtin_unreachable is supposed to fold to a simple compile-time assert, providing extra information to the compiler but not generating code.


r~

Reply via email to