The expression(args[i] < 0) always returns false (#1207)

* Update optimize.c

typedef uint64_t tcg_target_ulong;
typedef tcg_target_ulong TCGArg;
TCGArg *args
The expression(args[i] < 0) always returns false

* Update tcg.c

typedef uint64_t tcg_target_ulong;
typedef tcg_target_ulong TCGArg;
TCGArg *args
The expression(args[i] < 0) always returns false
This commit is contained in:
kickass156 2020-02-15 08:11:41 +08:00 committed by GitHub
parent d69ebfa55c
commit e54eea00ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1370,7 +1370,7 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *tcg_opc_ptr,
} else {
do_reset_output:
for (i = 0; i < nb_oargs; i++) {
if (args[i] < 0 || args[i] >= TCG_MAX_TEMPS) {
if (args[i] >= TCG_MAX_TEMPS) {
continue;
}
reset_temp(s, args[i]);

View File

@ -1719,7 +1719,7 @@ static void tcg_liveness_analysis(TCGContext *s)
implies side effects */
if (!(def->flags & TCG_OPF_SIDE_EFFECTS) && nb_oargs != 0) {
for(i = 0; i < nb_oargs; i++) {
if (args[i] < 0 || args[i] >= TCG_MAX_TEMPS) {
if (args[i] >= TCG_MAX_TEMPS) {
continue;
}
arg = args[i];