How to include "wide int" in code

U.Mutlu um@mutluit.com
Thu Jul 12 12:37:00 GMT 2018


colinb2 . wrote on 07/12/2018 12:08 PM:
> This is a patch/hook I tried when I attempted to make GCC-8.1.0 using
> the GCC created make file. The idea is it is a proof of concept. If it
> works on at least one person's machine then it should be possible to
> do the benchmarking of using "wide int" once against not using "wide
> int" at all that I'm really after by adding more code. But first get -
> or not - the proof of concept working!
>
> void
> choomuldo (int linenum)
> {
>    // Proof of concept of "hooking" into choose_multiplier.
>    // Paste this into expmed.c just before choose_multiplier,
>    // and at the start of choose_multiplier call this function.
>    int iv;
>    printf ("\n\n//# Choomuldo IN: from expmed.c line %d;\n", linenum);
>    // Print a few lines to stand out from the usual make output.
>    for (iv = 0; iv < 10; iv++) printf ("\n\n//# Choomuldo iv %d;\n", iv);
>    printf ("//# Choomuldo OUT: from expmed.c line %d;\n\n", linenum);
>    // Exit rather than return so we don't mix the output we want
>    // with lots of subsequent output from the make.
>    exit(1);
> }

Aeeh, what?  :-)
Come on, isn't something else missing here? B/c the above code does nothing 
but some printf() and calling exit(1), thereby interrupting or even aborting 
the build...



> On 7/12/18, colinb2 . <colinb2@gmail.com> wrote:
>> On 7/12/18, U.Mutlu <um@mutluit.com> wrote:
>>> colinb2 . wrote on 07/12/2018 02:52 AM:
>>> Do you mean the make file created by the configure script of gcc,
>>> or do you mean a self-made makefile?
>> I mean the make file created by the configure script of gcc; I think
>> I am - at least for now - incapable of writing my own script!
>> I just tried to make GCC-8.1.0 and that fell over after about 30 minutes!
>>
>>>> https://gcc.gnu.org/ml/gcc/2018-07/msg00159.html
>>
>>> I couldn't figure out yet which hdcode (ie. that of the book) you refer
>>> in the msg00159-link above (or have I maybe overlooked your reference?).
>>> I don't have that book. Can you give the ref-link please if it's among
>>> the codes published at the web site under
>>> http://hackersdelight.org/hdcode.htm
>>
>> http://hackersdelight.org/hdcodetxt/magicu.c.txt
>> This is magicu aand magicu2 in "Hacker's Delight" by Henry S Warren;
>> choose_multiplier_v4 in is my (hopefully improved) version of magicu2.
>>
>



More information about the Gcc-help mailing list