Age | Commit message (Collapse) | Author |
|
The unit size field was previously completely discarded when lowering
this instruction from BEAM to Icode.
This feature was previously missing and expressions such as <<0,
<<1:1>>/binary>> would succeed construction when compiled with HiPE.
|
|
This feature was previously missing and expressions such as
<<<<1:1>>/binary>> would succeed construction when compiled with HiPE.
A primop is_divisible is introduced to handle the case when the unit
size is not a power of two.
|
|
Relying on double-precision floating-point arithmetic to compute the
log2 of an integer up to 64 bits long leads to rounding errors.
|
|
* kostis/hipe-bs-match-huge-bin:
Fix matching with huge binaries
Compile without errors for exported variables
OTP-13092
|
|
copy_offset_int_big was assuming (Offset + Size - 1) (Tmp9 in the first
BB) would not underflow. It was also unconditionally reading and writing
the binary even when Size was zero, unlike copy_int_little, which is the
only other case of bs_put_integer that does not have a short-circuit on
Size = 0.
This was causing segfaults when constructing binaries starting with a
zero-length integer field, because a logical right shift was used to
compute an offset in bytes (which became 0x1fffffffffffffff) to read in
the binary.
Tests, taken from the emulator bs_construct_SUITE, were also added.
The complete credit for the report and the fix goes to Magnus Lång.
|
|
In certain cases of matching with very big binaries, the HiPE compiler
generated code that would fail the match, even in cases that the matching
was successful. The problem was more quite noticeable on 32-bit platforms
where certain integer quantities would be represented as bignums.
Brief summary of changes:
* gen_rtl({bs_skip_bits, ...}, ...) could not handle too large constants.
Previously the constants were truncated to word size.
* hipe_rtl_binary_match:make_size/3 erroneously assumed that the output
of first_part/3 would not overflow when multiplied by 8, which is no
longer true. To maintain full performance, the overflow test is only
performed when BitsVar was a bignum. Thus, the fast path is identical
to before.
* hipe_rtl_binary_match:set_high/2 was assuming that only bits below
bit 27 were ever set in arguments to bs_skip_bits, which is not only
false when the arguments are bignums, but also on 64-bit platforms.
The commit includes a test taken from the bs_match_bin_SUITE.
Most of the credit for finding these HiPE compiler errors and for
creating appropriate fixes for them should go to Magnus Lång.
|
|
|
|
OTP-12845
* bruce/change-license:
fix errors caused by changed line numbers
Change license text to APLv2
|
|
|
|
For quite some time now, this module generated a (quite harmless)
dialyzer warning. Comment out a clause which was actually unreachable.
While at it, do some small code refactorings here and there.
|
|
Only call emasculate_binary if ProcBin.flags is set,
which means it's a writable binary.
|
|
Seen symptom: Hipe compiled code with <<C/utf8, ...>> = Bin does sometimes
not match even though Bin contains a valid utf8 character. There might be
other possible binary matching symptoms, as the problem is not utf8
specific.
Problem: A writable binary was not "emasculated" when the matching started
(as it should) by the hipe compiled code.
Fix: Add a new primop emasculate_binary(Bin) that is called when
a matchstate is created.
ToDo: There are probably room for optimization. For example only call
emasculate_binary if ProcBin.flags is set.
|
|
hipe_rtl:phi_remove_pred/2 can produce a #move{} instruction with
floating-point temporaries as operands, even though such moves MUST
be #fmove{} instructions.
Added type checks to the #move{} and #fmove{} constructor and setter
functions to ensure that similar mishaps cannot happen again.
|
|
|
|
Namely, extend the HiPE tagging scheme info, properly handle the translation
of the (is_)map type test to Icode and RTL and support handling of the map()
type in the type system.
While at it, also performed some clean up of things that needed small fixes.
|
|
* ks/hipe-rtl-remove-constant/OTP-11822:
Remove RTL code that handled the (is_)constant guard
|
|
The (is_)constant/1 guard is removed from Erlang long ago and thus
there is no need to handle it in RTL.
While editing these files, also performed some minor cleanup.
|
|
Extend the 'rtl_var' definition to host liveness information needed for
a simple liveness analysis performed by the LLVM backend.
Also, uncomment some function definitions (mostly simple accessors) that
are already there and are useful for the translation of RTL code to LLVM
assembly.
Finally, extend the RTL 'call' instruction with the 'normalcontinuation'
field which is required for translating calls that are in the scope of
an exception handler. This extra field is required in order to point to
a new basic block which will hold the 'unwind label' of LLVM's invoke
instruction. While the 'unwind label' is semantically equivalent with
the 'failcontinuation', in LLVM this block must have a 'landingpad'
instruction. The problem arises by the fact that an RTL 'continuation'
block can also be accessible by other paths in the RTL CFG, and so
cannot be marked as a landing pad. To overcome this issue we create a
new block (the 'normalcontinuation') which is used as the 'unwind label'
of LLVM's invoke instruction and which will eventually transfer control
to the 'continuation' block.
|
|
|
|
|
|
|
|
Prior to R16B, the bs_match_string instruction worked only for cases
that had a destination variable. As shown by the example below, this
is not always the case and the Dst list can be empty.
test(<<42, _/bits>> = B) -> B.
This fixes a bug reported by Loïc Hoguin (02/12/2013); the original
post used a different code example to illustrate the problem.
While revising the code, a significant clean up was also performed.
|
|
|
|
|
|
* nox/enable-silent-rules/OTP-10726:
Implement ./otp_build configure --enable-silent-rules
|
|
With silent rules, the output of make is less verbose and compilation
warnings are easier to spot. Silent rules are disabled by default and
can be disabled or enabled at will by make V=0 and make V=1.
|
|
|
|
* maint:
Update to work with space in include path
Update to work with whitespace in exec path
|
|
OTP-10106
OTP-10107
|
|
|
|
|
|
|
|
|
|
|
|
Bug causing hipe to crash. Only provoked when changing the RTL
generation for floating point operations.
hipe_rtl:defines() was called with a expression ID instead of an
expression. Use expr_id_map_get_expr() to get expression from ID.
Need to pass along IdMap in order to do that.
|
|
Normally hipe assumes that generated native code will be executed
on the same emulator as the hipe compiler is running on.
This commit allows you to build a hipe "cross-compiler"
for a different configured emulator (but for same architecture).
Example:
> cd lib/hipe
> make clean
> make XCOMP=yes FLAVOR=smp TYPE=debug
This hipe compiler will generate code to be executed
on the debug compiled smp-emulator at $ERL_TOP.
|
|
|
|
|
|
* ks/hipe-ppc64:
Enable HiPE by default when compiling for PPC64
Translate RTL to PPC code on PPC64 too
Changes in ppc files for PPC64
Additions for the PPC64 backend
Changes for the PPC64 backend
Added loader for ppc64
New files for the 64-bit backends
Cleanup tags
OTP-9198
|
|
|
|
|
|
|
|
|
|
Merging the three off-heap lists (binaries, funs and externals) into
one list. This reduces memory consumption by two words (pointers) per
ETS object.
|
|
improvements.
Most notable:
Lots of cross compilation improvements. The old cross compilation
support was more or less non-existing as well as broken. Please,
note that the cross compilation support should still be
considered as experimental. Also note that old cross compilation
configurations cannot be used without modifications. For more
information on cross compiling Erlang/OTP see the
$ERL_TOP/xcomp/README file.
Support for staged install using <url
href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">D
ESTDIR</url>. The old broken INSTALL_PREFIX has also been fixed.
For more information see the $ERL_TOP/README file.
Documentation of the release target of the top Makefile. For more
information see the $ERL_TOP/README file.
make install now by default creates relative symbolic links
instead of absolute ones. For more information see the
$ERL_TOP/README file.
$ERL_TOP/configure --help=recursive now works and prints help for
all applications with configure scripts.
Doing make install, or make release directly after make all no
longer triggers miscellaneous rebuilds.
Existing bootstrap system is now used when doing make install, or
make release without a preceding make all.
The crypto and ssl applications use the same runtime library path
when dynamically linking against libssl.so and libcrypto.so. The
runtime library search path has also been extended.
The configure scripts of erl_interface and odbc now search for
thread libraries and thread library quirks the same way as erts
do.
The configure script of the odbc application now also looks for
odbc libraries in lib64 and lib/64 directories when building on a
64-bit system.
The config.h.in file in the erl_interface application is now
automatically generated in instead of statically updated which
reduces the risk of configure tests without any effect.
|
|
|