--- Log opened Fri Jul 08 00:00:29 2016 | ||
stekern | olofk: I can repro with an even smaller testcase: http://pastie.org/10901674 | 01:27 |
---|---|---|
stekern | and just or1k-elf-gcc -mhardfloat on that | 01:27 |
stekern | if I include <math.h>, I don't get the ICE | 01:34 |
olof | stekern: Thanks | 03:40 |
stekern | ...so, it seems like the ICE is dependent on something that is defined/not defined in some header file? | 03:41 |
stekern | since you see similar behaviour excluding/including include paths | 03:42 |
olof | Yeah, that makes sense | 03:42 |
olof | Trying to look up the definition of isinf now | 03:43 |
olof | That was harder than I thought. newlib is complicated | 03:48 |
stekern | my guess is that the float gets treated as a double, which we don't have support for in hw | 03:48 |
stekern | or something like that | 03:48 |
stekern | http://pubs.opengroup.org/onlinepubs/009695399/basedefs/math.h.html | 03:48 |
stekern | f FLT_EVAL_METHOD equals 0, float_t and double_t shall be float and double, respectively; if FLT_EVAL_METHOD equals 1, they shall both be double; if FLT_EVAL_METHOD equals 2, they shall both be long double; for other values of FLT_EVAL_METHOD, they are otherwise implementation-defined. | 03:48 |
* stekern makes wild guesses | 03:49 | |
olof | Hmm... if so... how to fix? | 03:49 |
olof | haha. I think you'r right | 03:50 |
stekern | no idea, but it's at least a grass straw to start grasping at ;) | 03:50 |
olof | double f=0.0; gets rid of the error | 03:50 |
olof | Is there a gcc switch to find out where it tries to locate isinf? | 03:52 |
olof | https://github.com/openrisc/newlib/blob/or1k/newlib/libc/include/ieeefp.h#L245 | 03:54 |
olof | Not sure if it's related, but here isinf is undefined and it looks like it declares a double version just below | 03:55 |
olof | https://github.com/openrisc/newlib/blob/or1k/newlib/libm/common/s_isnand.c#L78 | 03:58 |
olof | This might explain why it works when we include math.h | 03:58 |
olof | Also, isinff fails. | 04:07 |
olof | But not isinfd | 04:07 |
stekern | hmm, yes | 04:10 |
stekern | and isinff fails when math.h is included as well | 04:11 |
olof | I think isinf{f,d} are the functions from the expanded isinf macro | 04:11 |
olof | I found something that looks like it could be the real isinff function, but I'm not really sure | 04:11 |
olof | There's a lot in this #ifdef for the SPU arch https://github.com/openrisc/newlib/blob/or1k/newlib/libc/include/machine/ieeefp.h#L97 | 04:16 |
olof | Maybe we could get away with some special treatment here too | 04:16 |
olof | Also, __isinff works, but not isinff | 04:19 |
olof | bandvig: Check the backlog :) | 04:37 |
bandvig | olofk: yes, I'm reading it now :) | 04:38 |
olof | Also, __builtin_insff fails | 04:46 |
olof | __builtin_isinff | 04:47 |
bandvig | olofk: it also works fine if replace "-isystem $NEWLIB_ROOT/newlib/libc/include" with "-I$NEWLIB_ROOT/newlib/libc/include" | 05:07 |
olof | bandvig: Probably because it changes the order of the include headers | 05:10 |
bandvig | olof: Oh, It was my mistake. With "-I$NEWLIB_ROOT/newlib/libc/include" it also fails, but with more trace messages (I also adde -v option in command line to see include pathes) http://pastie.org/10901786 | 05:33 |
GeneralStupid | can anyone help me with modelsim please? | 11:42 |
GeneralStupid | how do i fix an empty work folder | 11:43 |
olofk | GeneralStupid: vlib work ? | 18:00 |
olofk | Time to sleep before heading to Boston. See some of you at the RISC-V conference | 18:03 |
olofk | And give me a ping if someone happens to be near Boston next week. Got a lot of free time to kill | 18:03 |
GeneralStupid | olofk: have a nice time in boston :D | 18:33 |
GeneralStupid | olofk: thanks i already fixed it | 18:34 |
kc5tja | olofk: Will you be attending the 5th workshop? If it'll be in the bay area, I should attend that too. If so, we should meet up then. | 20:04 |
--- Log closed Sat Jul 09 00:00:30 2016 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!