.
D 2022-09-06T09:11:04.807
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment Both\sTIP\s72\sand\sthe\sIntObj\sdocumentation\ssay\sthat\s<tt>Tcl_WideInt</tt>\s(wide\sinteger,\sand\s<tt>Tcl_WideUInt</tt>\sunsigned\swide\sinteger)\sis\s"at\sleast"\s64\sbits.\sFor\sclarity\sand\scompatibility,\sI\swould\spropose\srequiring\s<tt>Tcl_WideInt</tt>\sto\sbe\sexactly\s64\sbits,\sat\sleast\suntil\ssome\sfuture\sTcl\sversion.\r\n\r\nSome\scompilers\son\ssome\splatforms,\ssuch\sas\sGCC\sand\sClang\son\s64-bit\s(but\snot\s32-bit),\salready\soffer\san\s<tt>__int128</tt>\stype.\s128-bit\sarithmetic\sis\saccomplished\susing\sseveral\s64-bit\soperations,\ssince\sit\sis\snot\snatively\ssupported\sby\shardware\s(general\spurpose\sregister\sfile/ALU),\ssimilar\sto\show\s64-bit\soperations\sare\saccomplished\son\s32-bit\splatforms.\sBut\seven\swithout\snative\s128-bit\sarithmetic,\s<tt>__int128</tt>\scould\sstill\sbe\sfar\sfaster\sthan\sbignum\sfor\sany\sTcl\sapplications\sdoing\sup\sto\s128-bit\scomputing.\r\n\r\nHowever,\sI\swould\sthink\sfar\smore\ssoftware,\sincluding\score\sTcl,\swould\sbe\sbroken\sby\sdefining\s<tt>Tcl_WideInt</tt>\sas\swider\sthan\s64-bit.\sAnd\sfollowing\sTIP\s484,\sthere\sis\spresumably\slittle\sinterest\sin\sTcl\sonce\sagain\shaving\stwo\s"native"\sinteger\stypes\s(wide\sand\sdouble-wide).\r\n\r\nSo\smaybe\sdefining\s<tt>Tcl_WideInt</tt>\sas\sanything\sother\sthan\s64\sbit,\se.g.<tt>__int128</tt>,\sshould\sbe\sforbidden.\sAlternatively,\sif\s<tt>Tcl_WideInt</tt>\sis\sto\sever\sbe\sredefined\sas\s(preferably\sexactly)\s128-bit,\sit\sshould\sbe\sdone\sby\ssome\sfuture\sTcl\sversion\swhen\sthe\sABI\sis\sallowed\sto\schange.
J is_private 0
J login chrstphrchvz
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter chrstphrchvz
J subsystem 10.\sObjects
J title Require\sTcl_WideInt/Tcl_WideUInt\sto\sbe\sexactly\s64\sbits
J type RFE
K 931802a0f552db2e96d2ecf2439bdfb393b49451
U chrstphrchvz
Z 7053d72464a7243e32a9bf75ada2da66