target-lm32: fix debug memory access

CPU models which have the LM32_FLAG_IGNORE_MSB flag set will shadow the
lower 2GB to the upper 2GB memory space. This will fix the debug memory
access used by qemu console and GDB to match this behaviour.

Signed-off-by: Michael Walle <michael@walle.cc>
lm32-dis: fix NULL pointer dereference

Signed-off-by: Michael Walle <michael@walle.cc>
milkymist-uart: fix receive buffering

Inform qemu-char when more input data can be received.

Signed-off-by: Michael Walle <michael@walle.cc>
lm32_uart: fix receive buffering

Inform qemu-char when more input data can be received.

Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32: don't log cpu state in translation

Don't dump the cpu state because it can also be enabled by the "-d cpu"
parameter.

Signed-off-by: Michael Walle <michael@walle.cc>
tests: tcg: lm32: add more test cases

Esp. for testing zero/sign extend in compare operations.

Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32: fix cmpgui and cmpgeui opcodes

For unsigned compares the immediate has to be zero extended.

Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32: remove dead code

Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32: flush tlb after clearing env

The tlb data is stored within the CPU env. Therefore, the initialization
has to be done after we clear the environment. Otherwise the tlb will have
a valid entry for address 0x0.

Signed-off-by: Michael Walle <michael@walle.cc>
target-lm32: use HELPER() macro

Instead of hardcoding the function name, use the HELPER() macro for this.

Signed-off-by: Michael Walle <michael@walle.cc>
configure: proper OpenGL/GLX probe

Probe for GL and GLX symbols and X11 library. This fixes a build error
where the header files are available but the libraries are not.

Signed-off-by: Michael Walle <michael@walle.cc>
configure: rename OpenGL feature to GLX

As the probe now actually checks for the availability of GLX, rename it
accordingly. The only user of this feature is the milkymist-tmu2 model.

Signed-off-by: Michael Walle <michael@walle.cc>
Merge branch 'for-upstream' of git://github.com/mwalle/qemu

* 'for-upstream' of git://github.com/mwalle/qemu:
  configure: rename OpenGL feature to GLX
  configure: proper OpenGL/GLX probe
  target-lm32: use HELPER() macro
  target-lm32: flush tlb after clearing env
  target-lm32: remove dead code
  target-lm32: fix cmpgui and cmpgeui opcodes
  tests: tcg: lm32: add more test cases
  target-lm32: don't log cpu state in translation
  lm32_uart: fix receive buffering
  milkymist-uart: fix receive buffering
  lm32-dis: fix NULL pointer dereference
  target-lm32: fix debug memory access
Add moxie target code

Signed-off-by: Anthony Green <green@moxielogic.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add moxie disassembler

Signed-off-by: Anthony Green <green@moxielogic.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add sample moxie system

Signed-off-by: Anthony Green <green@moxielogic.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add top level changes for moxie

Signed-off-by: Anthony Green <green@moxielogic.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-i386: Fix flags computation for ADOX

When starting from CC_OP_DYNAMIC, and issuing adox before adcx,
a typo used the wrong value for the resulting CC_OP.

Cc: Blue Swirl <blauwirbel@gmail.com>
Reported-by: Torbjorn Granlund <tg@gmplib.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-i386: Don't modify env->eflags around cpu_dump_state

We can compute the value in cpu_dump_state anyway, and gratuitous
modifications to eflags creates heisenbugs.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg-optimize: Fold sub r,0,x to neg r,x

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>