From 1257cee4faf33cc69c9452ba54afe5d5dbd4ddf6 Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Thu, 3 Nov 2016 17:16:01 +0100 Subject: Fix the native code translation of bs_match_string This fixes a HiPE bug reported on erlang-questions on 2/11/2016. The BEAM to ICode tranaslation of the bs_match_string instruction, written long ago for binaries (i.e., with byte-sized strings), tried to do a `clever' translation of even bit-sized strings using a HiPE primop that took a `Size' argument expressed in *bytes*. ICode is not really the place to do such a thing, and moreover there is really no reason for the HiPE primop not to take a Size argument expressed in *bits* instead. This commit changes the `Size' argument to be in bits, postpones the translation of the bs_match_string primop Fixed in a pair-programming/debugging session with @margnus1. until RTL and does a proper translation using bit-sized quantities there. --- lib/hipe/rtl/hipe_rtl_binary.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/hipe/rtl/hipe_rtl_binary.erl') diff --git a/lib/hipe/rtl/hipe_rtl_binary.erl b/lib/hipe/rtl/hipe_rtl_binary.erl index fb9c0c196d..9b400f4c93 100644 --- a/lib/hipe/rtl/hipe_rtl_binary.erl +++ b/lib/hipe/rtl/hipe_rtl_binary.erl @@ -19,7 +19,7 @@ %%% %CopyrightEnd% %%% %%%------------------------------------------------------------------- -%%% File : hipe_rtl_binary_2.erl +%%% File : hipe_rtl_binary.erl %%% Author : Per Gustafsson %%% Description : %%% -- cgit v1.2.3