Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0289-beam_validator-More-bit-syntax-alignment-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0289-beam_validator-More-bit-syntax-alignment-inference-f.patch of Package erlang
From f5bfed95cfcbd3294e88ccf564c82df96ab56a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org> Date: Fri, 5 Feb 2021 09:15:11 +0100 Subject: [PATCH] beam_validator: More bit syntax alignment inference fixes --- lib/compiler/src/beam_validator.erl | 6 ++---- lib/compiler/test/bs_match_SUITE.erl | 4 ++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl index 64f990dc71..1207a90ac8 100644 --- a/lib/compiler/src/beam_validator.erl +++ b/lib/compiler/src/beam_validator.erl @@ -905,11 +905,9 @@ vi({test,bs_get_integer2=Op,{f,Fail},Live, validate_bs_get(Op, Fail, Ctx, Live, Stride, Type, Dst, Vst); vi({test,bs_get_integer2=Op,{f,Fail},Live,[Ctx,_Sz,Unit,_Flags],Dst},Vst) -> validate_bs_get(Op, Fail, Ctx, Live, Unit, #t_integer{}, Dst, Vst); -vi({test,bs_get_float2=Op,{f,Fail},Live,[Ctx,{integer,Sz},Unit,_],Dst},Vst) -> - Stride = Unit * Sz, +vi({test,bs_get_float2=Op,{f,Fail},Live,[Ctx,Size,Unit,_],Dst},Vst) -> + Stride = bsm_stride(Size, Unit), validate_bs_get(Op, Fail, Ctx, Live, Stride, #t_float{}, Dst, Vst); -vi({test,bs_get_float2=Op,{f,Fail},Live,[Ctx,_,_,_],Dst}, Vst) -> - validate_bs_get(Op, Fail, Ctx, Live, 32, #t_float{}, Dst, Vst); vi({test,bs_get_utf8=Op,{f,Fail},Live,[Ctx,_],Dst}, Vst) -> Type = beam_types:make_integer(0, ?UNICODE_MAX), validate_bs_get(Op, Fail, Ctx, Live, 8, Type, Dst, Vst); diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl index eb9e0f341a..5083a4428c 100644 --- a/lib/compiler/test/bs_match_SUITE.erl +++ b/lib/compiler/test/bs_match_SUITE.erl @@ -603,6 +603,10 @@ sum(<<>>, Last, Sum) -> {Sum,Last}. bin_and_float(Config) when is_list(Config) -> 14.0 = bin_and_float(<<1.0/float,2.0/float,3.0/float>>, 0.0), + + Sz = id(1), + <<>> = << <<0>> || <<1:Sz/float-unit:63>> <= <<2:30>> >>, + ok. bin_and_float(<<X/float,Y/float,Z/float,T/binary>>, Sum) when is_float(X), -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor