diff options
author | Sverker Eriksson <[email protected]> | 2016-11-07 17:11:01 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-11-07 17:11:01 +0100 |
commit | f294715ec476e2396a61b743c219312dafe6eed9 (patch) | |
tree | 441cd024b7b65af02efb71b0e412aa8d8f6b2c39 /lib/hipe/icode/hipe_icode_primops.erl | |
parent | 3e06b82f0f29d90bff0783e7f3d1dabb435782f5 (diff) | |
parent | 359caeeaf25854ec808b21e32cfc076283c07474 (diff) | |
download | otp-f294715ec476e2396a61b743c219312dafe6eed9.tar.gz otp-f294715ec476e2396a61b743c219312dafe6eed9.tar.bz2 otp-f294715ec476e2396a61b743c219312dafe6eed9.zip |
Merge branch 'kostis/hipe-bs_match_string/PR-1234/OTP-14005' into maint
* kostis/hipe-bs_match_string/PR-1234/OTP-14005:
Add a test case that should now work
Fix the native code translation of bs_match_string
Diffstat (limited to 'lib/hipe/icode/hipe_icode_primops.erl')
-rw-r--r-- | lib/hipe/icode/hipe_icode_primops.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hipe/icode/hipe_icode_primops.erl b/lib/hipe/icode/hipe_icode_primops.erl index cee37b6a57..2a141c514e 100644 --- a/lib/hipe/icode/hipe_icode_primops.erl +++ b/lib/hipe/icode/hipe_icode_primops.erl @@ -287,8 +287,8 @@ pp(Dev, Op) -> io:format(Dev, "bs_start_match<~w>", [Max]); {{bs_start_match, Type}, Max} -> io:format(Dev, "bs_start_match<~w,~w>", [Type,Max]); - {bs_match_string, String, SizeInBytes} -> - io:format(Dev, "bs_match_string<~w, ~w>", [String, SizeInBytes]); + {bs_match_string, String, SizeInBits} -> + io:format(Dev, "bs_match_string<~w, ~w>", [String, SizeInBits]); {bs_get_integer, Size, Flags} -> io:format(Dev, "bs_get_integer<~w, ~w>", [Size, Flags]); {bs_get_float, Size, Flags} -> @@ -596,10 +596,10 @@ type(Primop, Args) -> erl_types:t_subtract(Type, erl_types:t_matchstate()), erl_types:t_matchstate_slot( erl_types:t_inf(Type, erl_types:t_matchstate()), 0)); - {hipe_bs_primop, {bs_match_string,_,Bytes}} -> + {hipe_bs_primop, {bs_match_string,_,Bits}} -> [MatchState] = Args, BinType = erl_types:t_matchstate_present(MatchState), - NewBinType = match_bin(erl_types:t_bitstr(0, Bytes*8), BinType), + NewBinType = match_bin(erl_types:t_bitstr(0, Bits), BinType), erl_types:t_matchstate_update_present(NewBinType, MatchState); {hipe_bs_primop, {bs_test_unit,Unit}} -> [MatchState] = Args, |