Skip to contentSkip to conversation

target-arm/helper.c:5493: bad test ?

Qemu-devel dcb 2 participants 4 messages Feb 26, 2016 – May 27, 2016

lore
Share & tools
lore

dcb

author
#0 lore raw

Public bug reported:

[qemu/target-arm/helper.c:5493]: (style) Expression '(X & 0x1f) != 0xf80f0000' is always true.

Source code is

        (env->uncached_cpsr & CPSR_M) != CPSR_USER &&

but

./qemu/target-arm/cpu.h:#define CPSR_M (0x1fU)

./qemu/target-arm/cpu.h:#define CPSR_USER (CPSR_NZCV | CPSR_Q | CPSR_GE)

** Affects: qemu
Importance: Undecided
Status: New

Signature · 27 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1550503

Title:
  target-arm/helper.c:5493: bad test ?

Status in QEMU:
  New

Bug description:
  [qemu/target-arm/helper.c:5493]: (style) Expression '(X & 0x1f) !=
  0xf80f0000' is always true.

  Source code is

          (env->uncached_cpsr & CPSR_M) != CPSR_USER &&

  but

  ./qemu/target-arm/cpu.h:#define CPSR_M (0x1fU)

  ./qemu/target-arm/cpu.h:#define CPSR_USER (CPSR_NZCV | CPSR_Q |
  CPSR_GE)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1550503/+subscriptions
#1 lore raw
Quoted 7 lines · dcb

Public bug reported:

[qemu/target-arm/helper.c:5493]: (style) Expression '(X & 0x1f) != 0xf80f0000' is always true.

Source code is

Quoted 7 lines
        (env->uncached_cpsr & CPSR_M) != CPSR_USER &&

but

./qemu/target-arm/cpu.h:#define CPSR_M (0x1fU)

./qemu/target-arm/cpu.h:#define CPSR_USER (CPSR_NZCV | CPSR_Q | CPSR_GE)

Yeah, that's a bug. Should be ARM_CPU_MODE_USR, not CPSR_USER.

thanks
-- PMM

#2 lore raw
In reply to dcb

Should be fixed by http://patchwork.ozlabs.org/patch/590051/

** Changed in: qemu
Status: New => In Progress

Signature · 27 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1550503

Title:
  target-arm/helper.c:5493: bad test ?

Status in QEMU:
  In Progress

Bug description:
  [qemu/target-arm/helper.c:5493]: (style) Expression '(X & 0x1f) !=
  0xf80f0000' is always true.

  Source code is

          (env->uncached_cpsr & CPSR_M) != CPSR_USER &&

  but

  ./qemu/target-arm/cpu.h:#define CPSR_M (0x1fU)

  ./qemu/target-arm/cpu.h:#define CPSR_USER (CPSR_NZCV | CPSR_Q |
  CPSR_GE)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1550503/+subscriptions
author
#3 lore raw
In reply to dcb

Fix should be part of QEMU v2.6.0:
http://git.qemu.org/?p=qemu.git;a=commit;h=8c4f0eb94cc65ee32a
... so I think this ticket can now be closed.

** Changed in: qemu
Status: In Progress => Fix Released

Signature · 27 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1550503

Title:
  target-arm/helper.c:5493: bad test ?

Status in QEMU:
  Fix Released

Bug description:
  [qemu/target-arm/helper.c:5493]: (style) Expression '(X & 0x1f) !=
  0xf80f0000' is always true.

  Source code is

          (env->uncached_cpsr & CPSR_M) != CPSR_USER &&

  but

  ./qemu/target-arm/cpu.h:#define CPSR_M (0x1fU)

  ./qemu/target-arm/cpu.h:#define CPSR_USER (CPSR_NZCV | CPSR_Q |
  CPSR_GE)

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1550503/+subscriptions