aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/mem_helper.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2016-04-14 17:14:52 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2016-04-18 15:14:38 +1000
commitafbee7128c2399b6fca7b744ee560e3a1851118e (patch)
tree4ff672e1ae2b7a74012571f5efd1fd84f0195030 /target-ppc/mem_helper.c
parentc7b45f12828c1ba7105dbc029c63d7de68eaa91c (diff)
ppc: Fix the range check in the LSWI instruction
There are two issues: First, the number of registers that are used has to be calculated with "(nb + 3) / 4" (i.e. round always up, not down). Second, the "start <= ra && (start + nr - 32) > ra" condition for the wrap-around case is wrong: It has to be tested with "||" instead of "&&". Since we can reuse this check later for the LSWX instruction, let's place the fixed code into a helper function, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-ppc/mem_helper.c')
0 files changed, 0 insertions, 0 deletions