IRC logs for #openrisc Saturday, 2016-07-02

--- Log opened Sat Jul 02 00:00:20 2016
-!- Netsplit *.net <-> *.split quits: _florent_01:05
olofk_kc5tja: Welcome to our big family where we all love each other02:43
olofk_Except me... no one likes me02:43
* olofk_ is waiting to be comforted02:43
-!- olofk_ is now known as olofk02:43
wallentobluecmd: I think we should keep it as fossi03:46
olofkHappy birthday wallento! :)06:11
wallentothanks, olofk09:41
GeneralStupidohh happy birthday :) wallento09:45
olofkwallento: But I think you misunderstood. You're not supposed to give away presents on your birthday :) https://twitter.com/OlofKindgren/status/74923846745706496009:50
wallentohehe, how do you like the business cards?10:22
olofkwallento: They look great, and they are being retweeted like crazy :)12:01
bandvigHello all. I'm trying to build OR1K tool chain with latest NewLIB following by instructions http://openrisc.io/newlib/building.html12:07
bandvigI cloned binutils-gdb, or1k-gcc and newlib. I downloaded latest gmp/mpc/mpfr, unpacked them and created links in "gcc".12:07
bandvigI made the only modification in multi-lib configuration. Instead of "mno-delay/mcompat-delay msoft-float" I made only "mhard-float" to compile NewLIB itself (on stage "Building NewLIB") with mhard-float option switched ON.12:08
bandvigI successfully passed  "Build binutils" and "GCC stage 1", but building NewLIB failed with error message: http://pastebin.com/0FL0JxQ5.12:08
bandvigHowever if I try to build old NewLIB from or1k-src source tree, the stage passes successfully. Have any idea?12:08
blueCmdwallento: cool, let me know how you want to do that at a time that suites you12:09
blueCmdfor now I'll just renew it12:09
olofkbandvig: Which source did you use for newlib? The upstream repo or the OpenRISC one?12:15
olofkFirst thing that comes to mind is that this could be some problem with newer versions of gcc12:17
olofkNot sure how to easily debug this12:19
bandvigolofk: NewLIB I cloned from https://github.com/openrisc/newlib (or1k branch). I have the same problem wit gcc 4.9.2, 4.9.3 and 5.3.0.12:20
bandvigBut I have NO problem with NewLIB from https://github.com/openrisc/or1k-src and at least gcc 4.9.212:21
olofkHave you tried upstream newlib? That should at least be a lot more updated than the one in or1k-src12:22
bandvigNot yet. I'll try.12:24
bandvigolofk: could I use https://github.com/openrisc/newlib/tree/upstream ?12:27
olofkbandvig: Not sure12:28
olofkI guess wallento would know best12:32
bandvigI'm cloning git://sourceware.org/git/newlib-cygwin.git as recomended http://openrisc.io/newlib/building.html12:34
bandvigwell, it cloned and configured. Compilation has started.12:44
olofkLet me know if it works. I don't have a clue what's wrong, but at least this might make it easier to diff12:51
bandvigolofk: unfortunatelly the same error :(12:52
olofkhmm..12:52
olofkDo you know how old your previous newlib was?12:53
bandvigolofk: README of https://github.com/openrisc/or1k-src/tree/or1k/newlib stays that is "newlib-2.0.0 release"13:02
olofkah.. sorry. Forgot that you said you were using the one from or1k-src previously13:04
olofkI see that the failing function or1k_select_cc_mode is only used in a handful places. I wonder if we can turn this around and find out why it's failing instead13:06
olofkI hate internal gcc errors. Fells like they are always a mess to debug13:09
bandvigIn fact, the failed place ("float complex cprojf(float complex);") is declared in the absolutely same way in all NewLIB versions I tried. I'm afraid there is problem with maco declarations, or something like this.13:10
wallentobluecmd: probably don't renew, when is it due?13:11
wallentoI can start the transfer request today13:11
olofkYeah, I saw that too, and it hasn't changed for many years. Doesn't seem like anyone has touched or1k_select_cc_mode either since 201213:11
wallentobandvig: I will have a look at it tomorrow13:12
olofkHave you tried with the default flags?13:12
wallentobut thats also out of my comfort zone13:12
bandvigwallento: thanks, and happy birthday!13:13
wallentothanks13:14
bandvigolofk: not yet, I will now.13:15
olofkA bit far-fetched, but as it was Peter Gavin who wrote the function, he might only have tested it with the ISA version without the delay slot13:16
olofkbandvig: How do you enable hard-float? I tried to add -mhard-float when I ran configure while building newlib13:46
olofkOr do I need to add this to gcc stage1?13:47
olofkNever really understood how this all fits together13:47
bandvigolofk: you should open file path_to_src_gcc/gcc/config/or1k and edit declarations for MULTILIB_OPTIONS and MULTILIB_DIRNAMES, than rebild tool chain from stage "Build NewLIB".13:55
bandvigolofk: I use MULTILIB_OPTIONS = mhard-float and MULTILIB_DIRNAMES = hard-float13:55
bandvigor from "GCC stage 1"? I'm not sure.13:57
olofkbandvig: Aha. Is that how it's done. Always thought you could just get away with changing configure options15:12
bandvigolofk: wallento: I tried build gcc-5.3.0 with  https://github.com/openrisc/newlib (or1k branch) and reduced multi-lib options to MULTILIB_OPTIONS = msoft-float and MULTILIB_DIRNAMES = soft-float. And now "Build NewLIB" stage passed.15:15
bandvigso, the problem is definitely in mhard-float option and fresh version of NewLIB15:17
olofkbandvig: Hmm.. still don't get how this works. Does newlib pick up these options from gcc somehow?15:18
olofkI would have thought that you would specify this option in newlib rather than in gcc15:20
bandvigolofk: I think these options somehow affects gcc of stage 1. (I rebuild tool chain starting from GCC-1 stage)15:21
olofkI'm trying another option now15:28
olofkBecause my gcc, without any changes support the -mhard-float flag, so for me it just seems like we only need to enable it for newlib15:28
olofkBut I'm not an expert on this15:28
olofkok, so I got the same error now with my method15:30
olofkInstead of doing stuff in gcc, I just added -mhard-float to the newlib_cflags in newlib/newlib/configure.host15:30
olofkOne interesting difference is that it seems like I got a better stacktrace15:31
olofkhttp://pastie.org/1089748215:32
olofkSo it's the call from or1k_expand_int_compare that fails. Have to dif a bit deeper15:33
olofks/dif/dig15:33
olofkThere's an interesting comment here https://github.com/openrisc/or1k-gcc/blob/or1k/gcc/config/or1k/or1k.c#L38515:36
olofkMaybe there is some missing code for floating point15:36
olofkOr rather some code changes that exposes this in a new way15:36
olofkaha. Could this be the problem? (note: I still don't have much of a clue about gcc internals :))15:38
olofkhttps://github.com/openrisc/or1k-gcc/blob/or1k/gcc/config/or1k/or1k.c#L141115:38
olofkIt seems like we call or1k_expand_compare with "SFmode", which I interpret as some kind of floating point mode15:39
olofkBut or1k_expand_compare has a comment that says it only deals with integers15:39
olofkI tried to break out cprojf to a separate test case, but I can't make that fail15:52
bandvigolofk: good job! perhaps it would be the reason. However, it doesn't explain how it works with old version of NewLIB :o15:57
olofkTrue :/15:59
olofkBut these codebases are so damn complex, so it's difficult to get an overview15:59
olofkI think bisecting the problem is our best hope16:00
olofkBut that's hard too, since the working and failing cases are in different repos16:00
olofkBut I also think that adding the -mhard-float to configure.host in newlib is a cleaner solution than hacking the gcc options16:02
olofkBut I'm not sure of the implications16:02
bandvigolofk: I think if you want multi-lib configuration, then you have edit MULTILIB_* in gcc, but if you have fixed hardware configuration (for example, FPU is enabled permanentlu) then changing NewLIB's configure.host is more siutable.16:11
bandvigI use MULTILIB_* just because I found them first.16:11
olofkbandvig: Ah yes. That makes sens16:11
olofkjeremybennett: Is this your area perhaps. Remember why you wrote that comment on line 534 in or1k.md six years ago? :)16:12
olofkI wonder if we can trigger the error just by making a testcase that makes gcc emit cbranchsf416:12
olofkLooks like -fdump-{ipa,tree,rtl}-all might be useful16:23
olofkEnough for today16:25
olofkHmm.. what's a standard poster size?16:53
olofkGoogling a bit, the answer seems to be that it differs :)16:54
olofkLooks like I'll go for B1 (approximately)16:59
olofkor 700x1000mm to be exact17:01
olofkWhich apparently is the standard italian movie poster format called Un Foglio17:02
ZipCPUFor what it's worth, and anyone interested, I am in the process of building a controller for the QSPI flash on the Arty.17:57
ZipCPUIt's just enough different from the other QSPI flashes I've worked with that ... it needs some attention.17:58
ZipCPUMy plan is to get it running at Quad speed, to use the XIP feature, and to see if I can't get it running with a 100MHz clock on the Arty.17:58
ZipCPUThis includes full access to all of the device registers, the device ID, as well as read/write access to the one-time-programmable registers, the ability to do sector and subsector erases, etc.17:59
olofkZipCPU: Don't remember if I have mentioned this before, but have you checked out the quad SPI controller from the Pulpino project?18:54
ZipCPULooking it up now.19:16
ZipCPUOkay ... one difference here is the commands are done automatically by the controller.  The CPU doesn't need to issue them.  In particular, this means that, in the implementation I propose, the CPU may run from flash as though it were any other wishbone accessible device.19:18
ZipCPUThe ID registers may be read like registers, for example, and the fabric takes care of issuing the appropriate read ID register command and so forth.19:20
ZipCPUFurther, you can write the flash just like any other address--you just can't erase like any other address.19:20
ZipCPUWell, that and ... after writing, the flash goes out to lunch for a while, so you may want to be careful how you do it.19:20
ZipCPUIt's really useful for a CPU: you place the reset code and the boot loader into the flash, and then the CPU doesn't need to know anything more to read from it--the controller takes care of the details.19:23
ZipCPUIf you want to read large sections of flash, at pipeline speeds, you can use a DMA controller ...19:23
blueCmdwallento: it's due end of this month I think20:24
--- Log closed Sun Jul 03 00:00:21 2016

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!