On 08/06/14 02:55, Mcdaniel, Daryl wrote: > Jaben, Erik, or Lee: could you please review this? > > Could someone else validate this on Linux and/or ARM?
With the vfscanf.c change, I could test the patch; this is the output: --------- Produced by enquire version 5.1a, CWI, Amsterdam http://www.cwi.nl/~steven/enquire.html Compiler claims to be ANSI C level 1 Compiler names are at least 64 chars long Preprocessor names are at least 64 long SIZES char = 8 bits, signed short=16 int=32 long=64 float=32 double=64 bits long double=128 bits char*=64 bits BEWARE! larger than int! int* =64 bits BEWARE! larger than int! func*=64 bits BEWARE! larger than int! Type size_t is unsigned long Type wchar_t is signed short ALIGNMENTS char=1 short=2 int=4 long=8 float=4 double=8 long double=16 char*=8 int*=8 func*=8 CHARACTER ORDER short: BA int: DCBA long: HGFEDCBA PROPERTIES OF POINTERS Char and int pointer formats seem identical Char and function pointer formats seem identical Strings are shared Type ptrdiff_t is signed long PROPERTIES OF INTEGRAL TYPES Overflow of a short does not generate a trap Maximum short = 32767 (= 2**15-1) Minimum short = -32768 Overflow of an int does not generate a trap Maximum int = 2147483647 (= 2**31-1) Minimum int = -2147483648 Overflow of a long does not generate a trap Maximum long = 9223372036854775807 (= 2**63-1) Minimum long = -9223372036854775808 Maximum unsigned short = 65535 Maximum unsigned int = 4294967295 Maximum unsigned long = 18446744073709551615 PROMOTIONS unsigned short promotes to signed int long+unsigned gives signed long PROPERTIES OF FLOAT Base = 2 Significant base digits = 24 (= at least 6 decimal digits) Arithmetic rounds towards nearest Tie breaking rounds to even Smallest x such that 1.0-base**x != 1.0 = -24 Smallest x such that 1.0-x != 1.0 = 2.98023259e-08 Smallest x such that 1.0+base**x != 1.0 = -23 Smallest x such that 1.0+x != 1.0 = 5.96046519e-08 (Above number + 1.0) - 1.0 = 1.19209290e-07 Number of bits used for exponent = 8 Minimum normalised exponent = -126 Minimum normalised positive number = 1.17549435e-38 The smallest numbers are not kept normalised Smallest unnormalised positive number = 1.40129846e-45 Maximum exponent = 128 Maximum number = 3.40282347e+38 Overflow doesn't seem to generate a trap There is an 'infinite' value Divide by zero doesn't generate a trap Arithmetic uses a hidden bit It looks like single length IEEE format PROPERTIES OF DOUBLE Base = 2 Significant base digits = 53 (= at least 15 decimal digits) Arithmetic rounds towards nearest Tie breaking rounds to even Smallest x such that 1.0-base**x != 1.0 = -53 Smallest x such that 1.0-x != 1.0 = 5.5511151231257839e-17 Smallest x such that 1.0+base**x != 1.0 = -52 Smallest x such that 1.0+x != 1.0 = 1.1102230246251568e-16 (Above number + 1.0) - 1.0 = 2.2204460492503131e-16 Number of bits used for exponent = 11 Minimum normalised exponent = -1022 Minimum normalised positive number = 2.2250738585072014e-308 The smallest numbers are not kept normalised Smallest unnormalised positive number = 4.9406564584124654e-324 Maximum exponent = 1024 Maximum number = 1.7976931348623157e+308 Overflow doesn't seem to generate a trap There is an 'infinite' value Divide by zero doesn't generate a trap Arithmetic uses a hidden bit It looks like double length IEEE format PROPERTIES OF LONG DOUBLE Base = 2 Significant base digits = 64 (= at least 18 decimal digits) Arithmetic rounds towards nearest Tie breaking rounds to even Smallest x such that 1.0-base**x != 1.0 = -64 Smallest x such that 1.0-x != 1.0 = 2.71050543121376108502e-20 *** WARNING: Possibly bad output from printf above expected value around 2.71050543121376108502e-20, bit pattern: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 10000000 10111110 00111111 00000000 00000000 00000000 00000000 00000000 00000000 sscanf gave 2.71050543121376108502e-20, bit pattern: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 10111110 00111111 01101010 00111101 00000000 00000000 00000000 00000000 difference= 2.93873587705571876992e-39 Smallest x such that 1.0+base**x != 1.0 = -63 Smallest x such that 1.0+x != 1.0 = 5.42101086242752217004e-20 (Above number + 1.0) - 1.0 = 1.08420217248550443401e-19 Number of bits used for exponent = 15 Minimum normalised exponent = -16382 Minimum normalised positive number = 0.00000000000000000000e+00 *** WARNING: Possibly bad output from printf above expected value around 3.36210314311209357285e-4932, bit pattern: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 sscanf gave 0.00000000000000000000e+00, bit pattern: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01101010 00111101 00000000 00000000 00000000 00000000 difference= 0.00000000000000000000e+00 The smallest numbers are not kept normalised Smallest unnormalised positive number = 0.00000000000000000000e+00 *** WARNING: Possibly bad output from printf above expected value around 3.64519953188247480824e-4951, bit pattern: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 sscanf gave 0.00000000000000000000e+00, bit pattern: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 01101010 00111101 00000000 00000000 00000000 00000000 difference= 0.00000000000000000000e+00 Maximum exponent = 16384 Maximum number = inf *** WARNING: Possibly bad output from printf above expected value around 1.18973149535723177195e4932, bit pattern: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111110 01111111 01101001 00111101 00000000 00000000 00000000 00000000 sscanf gave nan, bit pattern: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 11111111 01111111 01101010 00111101 00000000 00000000 00000000 00000000 difference= nan Overflow doesn't seem to generate a trap There is an 'infinite' value Divide by zero doesn't generate a trap Only 79 of the 128 bits of a long double are actually used It doesn't look like IEEE format Float expressions are evaluated in float precision Double expressions are evaluated in double precision Long double expressions are evaluated in long double precision Memory mallocatable ~= 997 Mbytes For hints on dealing with the 4 problems above see the section 'TROUBLESHOOTING' in the file .../AppPkg/Applications/Enquire/Enquire.c --------- Thanks Laszlo ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
