diff options
author | Sverker Eriksson <[email protected]> | 2016-08-26 12:27:17 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-08-26 12:27:17 +0200 |
commit | f3e018dc3bb3c74b88c7454f6a1888938215f912 (patch) | |
tree | 7f217508515647e557cf3c30c79badba9ab0f1dd /lib/hipe/ppc/hipe_ppc_assemble.erl | |
parent | 2a6750d0804d1e30a5463c8aaf5b7342fda967fe (diff) | |
parent | a504c30efbc14381385a6ef911ba7296840f8cb7 (diff) | |
download | otp-f3e018dc3bb3c74b88c7454f6a1888938215f912.tar.gz otp-f3e018dc3bb3c74b88c7454f6a1888938215f912.tar.bz2 otp-f3e018dc3bb3c74b88c7454f6a1888938215f912.zip |
Merge branch 'sverker/hipe-backend-bugs/PR-1146' into maint
Diffstat (limited to 'lib/hipe/ppc/hipe_ppc_assemble.erl')
-rw-r--r-- | lib/hipe/ppc/hipe_ppc_assemble.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/hipe/ppc/hipe_ppc_assemble.erl b/lib/hipe/ppc/hipe_ppc_assemble.erl index ff9da01b11..d89ff6235c 100644 --- a/lib/hipe/ppc/hipe_ppc_assemble.erl +++ b/lib/hipe/ppc/hipe_ppc_assemble.erl @@ -175,7 +175,8 @@ do_slwi_opnds(Dst, Src1, {uimm,N}) when is_integer(N), 0 =< N, N < 32 -> {Dst, Src1, {sh,N}, {mb,0}, {me,31-N}}. do_srwi_opnds(Dst, Src1, {uimm,N}) when is_integer(N), 0 =< N, N < 32 -> - {Dst, Src1, {sh,32-N}, {mb,N}, {me,31}}. + %% SH should be 0 (not 32) when N is 0 + {Dst, Src1, {sh,(32-N) band 31}, {mb,N}, {me,31}}. do_srawi_src2({uimm,N}) when is_integer(N), 0 =< N, N < 32 -> {sh,N}. @@ -184,7 +185,8 @@ do_sldi_opnds(Dst, Src1, {uimm,N}) when is_integer(N), 0 =< N, N < 64 -> {Dst, Src1, {sh6,N}, {me6,63-N}}. do_srdi_opnds(Dst, Src1, {uimm,N}) when is_integer(N), 0 =< N, N < 64 -> - {Dst, Src1, {sh6,64-N}, {mb6,N}}. + %% SH should be 0 (not 64) when N is 0 + {Dst, Src1, {sh6,(64-N) band 63}, {mb6,N}}. do_sradi_src2({uimm,N}) when is_integer(N), 0 =< N, N < 64 -> {sh6,N}. @@ -246,6 +248,7 @@ do_load(I) -> case LdOp of 'ld' -> do_disp_ds(Disp); 'ldu' -> do_disp_ds(Disp); + 'lwa' -> do_disp_ds(Disp); _ -> do_disp(Disp) end, NewBase = do_reg(Base), |