Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
c44edc0d
Commit
c44edc0d
authored
Oct 04, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
take into account X696 Corrigendum 1 (05/2017)
parent
9854e669
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
libasn1fix/asn1fix_crange.c
libasn1fix/asn1fix_crange.c
+2
-2
tests/tests-asn1c-compiler/154-with-REAL-components-OK.asn1
tests/tests-asn1c-compiler/154-with-REAL-components-OK.asn1
+7
-7
tests/tests-randomized/bundles/04-REAL-bundle.txt
tests/tests-randomized/bundles/04-REAL-bundle.txt
+5
-4
No files found.
libasn1fix/asn1fix_crange.c
View file @
c44edc0d
...
...
@@ -933,7 +933,7 @@ asn1f_real_range_from_WCOMPS(const char *dbg_name,
&&
base
->
left
.
type
==
ARE_VALUE
&&
base
->
right
.
type
==
ARE_VALUE
&&
base
->
left
.
value
==
2
&&
base
->
right
.
value
==
2
&&
exponent
->
left
.
type
==
ARE_VALUE
&&
exponent
->
right
.
type
==
ARE_VALUE
&&
exponent
->
left
.
value
>=
-
126
&&
exponent
->
right
.
value
<=
127
)
{
&&
exponent
->
left
.
value
>=
-
323
&&
exponent
->
right
.
value
<=
292
)
{
range
->
narrowing
=
NARROW_FLOAT32
;
}
else
/* X.696 #12.3 */
if
(
mantissa
->
left
.
type
==
ARE_VALUE
&&
mantissa
->
right
.
type
==
ARE_VALUE
...
...
@@ -942,7 +942,7 @@ asn1f_real_range_from_WCOMPS(const char *dbg_name,
&&
base
->
left
.
type
==
ARE_VALUE
&&
base
->
right
.
type
==
ARE_VALUE
&&
base
->
left
.
value
==
2
&&
base
->
right
.
value
==
2
&&
exponent
->
left
.
type
==
ARE_VALUE
&&
exponent
->
right
.
type
==
ARE_VALUE
&&
exponent
->
left
.
value
>=
-
10
22
&&
exponent
->
right
.
value
<=
1023
)
{
&&
exponent
->
left
.
value
>=
-
10
74
&&
exponent
->
right
.
value
<=
971
)
{
range
->
narrowing
=
NARROW_FLOAT64
;
}
...
...
tests/tests-asn1c-compiler/154-with-REAL-components-OK.asn1
View file @
c44edc0d
...
...
@@ -16,35 +16,35 @@ DEFINITIONS ::= BEGIN
Indirect-IEEE-binary32 ::= UnconstrainedREAL (WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-
126..126
)})
base (2), exponent (-
323..292
)})
-- X.696 (08/2005) #12.2 and #12.3
-- IEEE 754 encoding single precision
IEEE-binary32-w ::= REAL (WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-
126..126
)})
base (2), exponent (-
323..292
)})
IEEE-binary32-0w ::= REAL (0 | WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-
126..126
)})
base (2), exponent (-
323..292
)})
IEEE-binary32-w0 ::= REAL (WITH COMPONENTS {
mantissa (-16777215..16777215),
base (2), exponent (-
126..126
)} | 0)
base (2), exponent (-
323..292
)} | 0)
-- IEEE 754 encoding double precision
IEEE-binary64-w ::= REAL (WITH COMPONENTS {
mantissa (-9007199254740991..9007199254740991),
base (2), exponent (-10
22..1023
)})
base (2), exponent (-10
74..971
)})
IEEE-binary64-0w ::= REAL (0 | WITH COMPONENTS {
mantissa (-9007199254740991..9007199254740991),
base (2), exponent (-10
22..1023
)})
base (2), exponent (-10
74..971
)})
IEEE-binary64-w0 ::= REAL (WITH COMPONENTS {
mantissa (-9007199254740991..9007199254740991),
base (2), exponent (-10
22..1023
)} | 0)
base (2), exponent (-10
74..971
)} | 0)
Test ::= SEQUENCE {
indirect-ieee-binary32 Indirect-IEEE-binary32,
...
...
tests/tests-randomized/bundles/04-REAL-bundle.txt
View file @
c44edc0d
-- Test the REAL (floating point) type.
T ::= REAL
T ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-126..126)})
T ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1022..1023)})
T ::= Real32 Real32 ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-126..126)})
T ::= Real64 Real64 ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1022..1023)})
T ::= REAL (WITH COMPONENTS { mantissa (-16384..16384), base (2), exponent (-10..10)})
T ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-323..292)})
T ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1074..971)})
T ::= Real32 Real32 ::= REAL (WITH COMPONENTS { mantissa (-16777215..16777215), base (2), exponent (-323..292)})
T ::= Real64 Real64 ::= REAL (WITH COMPONENTS { mantissa (-9007199254740991..9007199254740991), base (2), exponent (-1074..971)})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment