diff options
author | Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com> | 2017-02-04 00:17:17 -0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-07 13:13:46 +0000 |
commit | 05e58288b6a6ffd4cdf033e37d5682c5b1ef8576 (patch) | |
tree | 7729d742eaba87149e3203a10a26bec0a09afb41 /risugen_ppc64.pm | |
parent | 282686eeb729be6f7e52cccffca23e1fb6c46b93 (diff) |
risu_ppc64le: fix 32-bit mov immediate
Two instructions are necessary but the high value should be written
first, shifted 16 bit left, and then or'ed the lower value. This commit
fixes the problem.
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Message-id: 1486174642-14883-3-git-send-email-joserz@linux.vnet.ibm.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risugen_ppc64.pm')
-rw-r--r-- | risugen_ppc64.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/risugen_ppc64.pm b/risugen_ppc64.pm index ca052de..40f3d4f 100644 --- a/risugen_ppc64.pm +++ b/risugen_ppc64.pm @@ -61,8 +61,8 @@ sub write_mov_ri32($$) { my ($rd, $imm) = @_; - # li rd,immediate@h - write_mov_ri16($rd, ($imm >> 16) & 0xffff); + # lis rd,immediate@h + insn32(0xf << 26 | $rd << 21 | ($imm >> 16)); # ori rd,rd,immediate@l insn32((0x18 << 26) | ($rd << 21) | ($rd << 16) | ($imm & 0xffff)); } |