qemu-e2k/target/rx
Stefan Weil 77182df19f target/rx: Fix compiler errors for build with sanitizers
gcc (Debian 10.2.1-6) 10.2.1 20210110 aborts builds with enabled sanitizers:

../../../target/rx/op_helper.c: In function ‘helper_scmpu’:
../../../target/rx/op_helper.c:213:24: error: ‘tmp1’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  213 |     env->psw_c = (tmp0 >= tmp1);
      |                  ~~~~~~^~~~~~~~
../../../target/rx/op_helper.c:213:24: error: ‘tmp0’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
../../../target/rx/op_helper.c: In function ‘helper_suntil’:
../../../target/rx/op_helper.c:299:23: error: ‘tmp’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  299 |     env->psw_c = (tmp <= env->regs[2]);
      |                  ~~~~~^~~~~~~~~~~~~~~~
../../../target/rx/op_helper.c: In function ‘helper_swhile’:
../../../target/rx/op_helper.c:318:23: error: ‘tmp’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  318 |     env->psw_c = (tmp <= env->regs[2]);
      |                  ~~~~~^~~~~~~~~~~~~~~~

Rewriting the code fixes those errors.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210128172127.46041-1-sw@weilnetz.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-01-29 09:31:53 +01:00
..
cpu-param.h target/rx: CPU definitions 2020-03-19 17:58:05 +01:00
cpu-qom.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
cpu.c tcg: Make tb arg to synchronize_from_tb const 2021-01-07 05:09:41 -10:00
cpu.h rx: Move typedef RXCPU to cpu-qom.h 2020-09-02 07:29:25 -04:00
disas.c meson: target 2020-08-21 06:30:35 -04:00
gdbstub.c rx: Rename QOM type check macros 2020-09-02 07:29:25 -04:00
helper.c rx: Rename QOM type check macros 2020-09-02 07:29:25 -04:00
helper.h
insns.decode target/rx: Fix Lesser GPL version number 2020-10-27 00:22:56 +01:00
meson.build meson: target 2020-08-21 06:30:35 -04:00
op_helper.c target/rx: Fix compiler errors for build with sanitizers 2021-01-29 09:31:53 +01:00
translate.c target/rx: Fix some comment spelling errors 2020-10-27 00:22:56 +01:00