diff options
| author | Thomas Huth <thuth@redhat.com> | 2016-04-14 17:14:52 +0200 |
|---|---|---|
| committer | David Gibson <david@gibson.dropbear.id.au> | 2016-04-18 15:14:38 +1000 |
| commit | afbee7128c2399b6fca7b744ee560e3a1851118e (patch) | |
| tree | 4ff672e1ae2b7a74012571f5efd1fd84f0195030 /qapi/string-input-visitor.c | |
| parent | c7b45f12828c1ba7105dbc029c63d7de68eaa91c (diff) | |
| download | focaccia-qemu-afbee7128c2399b6fca7b744ee560e3a1851118e.tar.gz focaccia-qemu-afbee7128c2399b6fca7b744ee560e3a1851118e.zip | |
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 'qapi/string-input-visitor.c')
0 files changed, 0 insertions, 0 deletions