aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/rtl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-01-03 17:09:40 +0100
committerGitHub <[email protected]>2018-01-03 17:09:40 +0100
commit93042b54da6a576b187bfb7b2222fc8a5a4d4f12 (patch)
tree63c351d2ce560f096a0655487ef5714dbbf2cedf /lib/hipe/rtl
parent0c08677522f1add0f6161328a0009e3ac3401f1e (diff)
parent898352fd68022432c1e6f8d9b7a926394d3e8899 (diff)
downloadotp-93042b54da6a576b187bfb7b2222fc8a5a4d4f12.tar.gz
otp-93042b54da6a576b187bfb7b2222fc8a5a4d4f12.tar.bz2
otp-93042b54da6a576b187bfb7b2222fc8a5a4d4f12.zip
Merge PR-1664 from sverker/sverker/hipe-bs_put_utf8-gc-bug OTP-14850
Fix GC bug for HiPE primop bs_put_utf8
Diffstat (limited to 'lib/hipe/rtl')
-rw-r--r--lib/hipe/rtl/hipe_rtl_binary_construct.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/hipe/rtl/hipe_rtl_binary_construct.erl b/lib/hipe/rtl/hipe_rtl_binary_construct.erl
index bc215e3abe..ec7044a2b9 100644
--- a/lib/hipe/rtl/hipe_rtl_binary_construct.erl
+++ b/lib/hipe/rtl/hipe_rtl_binary_construct.erl
@@ -168,9 +168,13 @@ gen_rtl(BsOP, Dst, Args, TrueLblName, FalseLblName, SystemLimitLblName, ConstTab
bs_put_utf8 ->
[_Src, _Base, _Offset] = Args,
- NewDsts = get_real(Dst),
- [hipe_rtl:mk_call(NewDsts, bs_put_utf8, Args,
- TrueLblName, FalseLblName, not_remote)];
+ [NewOffs] = get_real(Dst),
+ RetLbl = hipe_rtl:mk_new_label(),
+ [hipe_rtl:mk_call([NewOffs], bs_put_utf8, Args,
+ hipe_rtl:label_name(RetLbl), [], not_remote),
+ RetLbl,
+ hipe_rtl:mk_branch(NewOffs, ne, hipe_rtl:mk_imm(0),
+ TrueLblName, FalseLblName, 0.99)];
bs_utf16_size ->
case Dst of