From noreply at github.com Thu May 26 23:16:02 2016 From: noreply at github.com (GitHub) Date: Thu, 26 May 2016 14:16:02 -0700 Subject: [M3commit] [modula3/cm3] 640946: Fix bug compiling 16_8000000000000000 on 32-bit co... Message-ID: <5747679259f01_452e3f924baf92a0150462@hookshot-fe5-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 64094695f6ece0914026729f93b9085297db1fa9 https://github.com/modula3/cm3/commit/64094695f6ece0914026729f93b9085297db1fa9 Author: Rodney Bates Date: 2016-05-26 (Thu, 26 May 2016) Changed paths: M m3-sys/m3front/src/misc/TipeDesc.m3 M m3-sys/m3middle/src/M3CG_BinWr.m3 M m3-sys/m3middle/src/TInt.i3 M m3-sys/m3middle/src/TInt.m3 Log Message: ----------- Fix bug compiling 16_8000000000000000 on 32-bit compile machine. There was a mismatch in assumptions between TInt.ToBytes and its callers. ToBytes treated its parameter as a TInt.T, a twos-complement number stored in 9 bytes, so it can represent the overlap of 64-bit signed and 64-bit unsigned values. It also treated its result byte area as twos complement. Its callers are converting to a sign-magnitude representation, and have already converted negative values to absolute value. For this one value, this would require 9 bytes in twos-complement, but M3CG_BINWr.AddBigX only provides 8, which ToBytes, rightly, according to its assumptions, considers insufficient to hold this number and returns zero. Fixed by rewriting ToBytes with preconditioins that the value is nonnegative and fits in the given number of result bytes, but does not need a sign bit, since it is implicitly positive. Rename this ToUnsignedBytes, to be less likely to fool future potential callers. From noreply at github.com Fri May 27 21:23:42 2016 From: noreply at github.com (GitHub) Date: Fri, 27 May 2016 12:23:42 -0700 Subject: [M3commit] [modula3/cm3] 926edb: Add some more cases to p045. Message-ID: <57489ebe9b1c_53853fd44da6d2c0141822@hookshot-fe2-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 926edbe1ccae523961e576bca43bc101f4eaaa99 https://github.com/modula3/cm3/commit/926edbe1ccae523961e576bca43bc101f4eaaa99 Author: Rodney Bates Date: 2016-05-27 (Fri, 27 May 2016) Changed paths: M m3-sys/m3tests/src/p0/p045/Main.m3 Log Message: ----------- Add some more cases to p045. From noreply at github.com Thu May 26 23:16:02 2016 From: noreply at github.com (GitHub) Date: Thu, 26 May 2016 14:16:02 -0700 Subject: [M3commit] [modula3/cm3] 640946: Fix bug compiling 16_8000000000000000 on 32-bit co... Message-ID: <5747679259f01_452e3f924baf92a0150462@hookshot-fe5-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 64094695f6ece0914026729f93b9085297db1fa9 https://github.com/modula3/cm3/commit/64094695f6ece0914026729f93b9085297db1fa9 Author: Rodney Bates Date: 2016-05-26 (Thu, 26 May 2016) Changed paths: M m3-sys/m3front/src/misc/TipeDesc.m3 M m3-sys/m3middle/src/M3CG_BinWr.m3 M m3-sys/m3middle/src/TInt.i3 M m3-sys/m3middle/src/TInt.m3 Log Message: ----------- Fix bug compiling 16_8000000000000000 on 32-bit compile machine. There was a mismatch in assumptions between TInt.ToBytes and its callers. ToBytes treated its parameter as a TInt.T, a twos-complement number stored in 9 bytes, so it can represent the overlap of 64-bit signed and 64-bit unsigned values. It also treated its result byte area as twos complement. Its callers are converting to a sign-magnitude representation, and have already converted negative values to absolute value. For this one value, this would require 9 bytes in twos-complement, but M3CG_BINWr.AddBigX only provides 8, which ToBytes, rightly, according to its assumptions, considers insufficient to hold this number and returns zero. Fixed by rewriting ToBytes with preconditioins that the value is nonnegative and fits in the given number of result bytes, but does not need a sign bit, since it is implicitly positive. Rename this ToUnsignedBytes, to be less likely to fool future potential callers. From noreply at github.com Fri May 27 21:23:42 2016 From: noreply at github.com (GitHub) Date: Fri, 27 May 2016 12:23:42 -0700 Subject: [M3commit] [modula3/cm3] 926edb: Add some more cases to p045. Message-ID: <57489ebe9b1c_53853fd44da6d2c0141822@hookshot-fe2-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 926edbe1ccae523961e576bca43bc101f4eaaa99 https://github.com/modula3/cm3/commit/926edbe1ccae523961e576bca43bc101f4eaaa99 Author: Rodney Bates Date: 2016-05-27 (Fri, 27 May 2016) Changed paths: M m3-sys/m3tests/src/p0/p045/Main.m3 Log Message: ----------- Add some more cases to p045. From noreply at github.com Thu May 26 23:16:02 2016 From: noreply at github.com (GitHub) Date: Thu, 26 May 2016 14:16:02 -0700 Subject: [M3commit] [modula3/cm3] 640946: Fix bug compiling 16_8000000000000000 on 32-bit co... Message-ID: <5747679259f01_452e3f924baf92a0150462@hookshot-fe5-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 64094695f6ece0914026729f93b9085297db1fa9 https://github.com/modula3/cm3/commit/64094695f6ece0914026729f93b9085297db1fa9 Author: Rodney Bates Date: 2016-05-26 (Thu, 26 May 2016) Changed paths: M m3-sys/m3front/src/misc/TipeDesc.m3 M m3-sys/m3middle/src/M3CG_BinWr.m3 M m3-sys/m3middle/src/TInt.i3 M m3-sys/m3middle/src/TInt.m3 Log Message: ----------- Fix bug compiling 16_8000000000000000 on 32-bit compile machine. There was a mismatch in assumptions between TInt.ToBytes and its callers. ToBytes treated its parameter as a TInt.T, a twos-complement number stored in 9 bytes, so it can represent the overlap of 64-bit signed and 64-bit unsigned values. It also treated its result byte area as twos complement. Its callers are converting to a sign-magnitude representation, and have already converted negative values to absolute value. For this one value, this would require 9 bytes in twos-complement, but M3CG_BINWr.AddBigX only provides 8, which ToBytes, rightly, according to its assumptions, considers insufficient to hold this number and returns zero. Fixed by rewriting ToBytes with preconditioins that the value is nonnegative and fits in the given number of result bytes, but does not need a sign bit, since it is implicitly positive. Rename this ToUnsignedBytes, to be less likely to fool future potential callers. From noreply at github.com Fri May 27 21:23:42 2016 From: noreply at github.com (GitHub) Date: Fri, 27 May 2016 12:23:42 -0700 Subject: [M3commit] [modula3/cm3] 926edb: Add some more cases to p045. Message-ID: <57489ebe9b1c_53853fd44da6d2c0141822@hookshot-fe2-cp1-prd.iad.github.net.mail> Branch: refs/heads/master Home: https://github.com/modula3/cm3 Commit: 926edbe1ccae523961e576bca43bc101f4eaaa99 https://github.com/modula3/cm3/commit/926edbe1ccae523961e576bca43bc101f4eaaa99 Author: Rodney Bates Date: 2016-05-27 (Fri, 27 May 2016) Changed paths: M m3-sys/m3tests/src/p0/p045/Main.m3 Log Message: ----------- Add some more cases to p045.