IRC logs for #openrisc Monday, 2014-04-21

--- Log opened Mon Apr 21 00:00:14 2014
stekernolofk: no, but it is in the 30 day eval version04:25
stekernuse diila instead04:25
stekerngithub.com/skristiansson/diila04:26
blueCmdstekern: while scouring the internet somebody mentioned that you have to emit_ stuff in a certain stage for it to work correctly, could that be i?08:28
blueCmdit*08:28
stekernblueCmd: yeah, that's what I had in mind09:25
rfajardohello everyone. Happy Easter! I’m having problems with uClibc from Jonas. When I try to set the defconfig, it fails. I have an older uClibc which works. Do you guys know anything about it?11:48
blueCmd"fails" is a bit ambigious11:51
blueCmdalso, hi!11:51
stekernrfajardo: if you are using the or1k- toolchain, you should use this: https://github.com/openrisc/uClibc-or1k12:25
rfajardoCan't find default configuration "extra/Configs/defconfigs/ARCH"!12:25
rfajardostekern, I’m actually trying to build or3212:26
rfajardogrep tells me it comes from .//extra/config/conf.c12:26
stekernthen I don't know what's wrong, jonas tree hasn't changed in two years and it has definetely worked after that12:26
rfajardofunny enough, uClibc-or1k works12:27
rfajardoI’m sorry I might have sounded bad there. I’m only boggled12:27
stekernnah, I don't think you did12:28
rfajardothe explanation of two trees shed some light on it12:28
stekernI'm starting to understand why they are calling libreoffice a killer-app, it's f*cking killing me...12:37
rfajardoIhahahaha12:40
blueCmdstekern: idea: implement TLS resolve in legitimize_address instead of the expansion of the move operation12:57
blueCmdI took a closer look, and it appears that that seems to be the way other arches has done it12:57
blueCmdThis dead doc patch seems to point towards that aswell: http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01070.html12:58
rfajardostekern, I was able to patch the Makefile.in in order to make it work. OS X problem most probably. I’m still wasting my time on that :).13:12
stekernblueCmd: sgtm14:16
blueCmdstekern: with legitimize: http://01c5901e177c4085.paste.se/15:52
blueCmdit loads the tls offsets higher up in the function, but it's still not correct16:02
blueCmdstekern: I'm wondering if I or1k_save_reg or something is not taking this into account.17:03
blueCmdI added a fprintf right before the call to mpfr_cache. The arguments to fprintf are constructed the correct way17:05
blueCmdfprintf obviously doesn't take the same first argument as mpfr_cache, and without the TLS variable GCC sees that and saves/restores r3 around the fprint call17:06
blueCmdwith TLS GCC forgets that17:06
stekernhmm, how does your or1k.c look like now?17:07
stekernor1k_save_reg shouldn't be involved, since the problem is with caller-saved regs17:08
olofkAha. I didn't know you could have a wiki connected to a github repo.17:41
olofkI can't understand how github can make enough money to support all these services17:41
blueCmdstekern: http://storage.googleapis.com/bluecmd-openrisc/or1k.diff17:44
blueCmdbeware of the crap17:45
blueCmdoutput from gcc: http://6b8256f743158584.paste.se/17:45
blueCmdor1k_legitimize_address doesn't call the TLS specific function, which I think is kind of odd, so the result should have been the same as before17:46
blueCmdi implemented TARGET_CANNOT_FORCE_CONST_MEM as well now, no change18:05
olofkstekern: Yes, I'm going for the diila solution. Problem is that have to get the stupid debug interface working first18:06
olofkLimb: You had some success with the bscan component for you Artix, right?18:09
stekernolofk: I think there are quite a few companies that actually use github for "private repos"18:14
stekern...and those aren't free18:15
blueCmdolofk: I pay for github :)18:15
stekernblueCmd: ok, yeah, that looks like what other archs are doing afaics18:18
olofkI know that they have a commercial alternative. Just didn't know anyone who used that18:19
olofkblueCmd: Is it private or via your company?18:19
blueCmdolofk: privately18:24
-!- Megaf_ is now known as Megaf18:27
stekernblueCmd: there's got to be some deep gcc thing that goes wrong there18:33
stekernwould be interesting to see how the asm output for e.g. mixcoblaze looks like for the same thing18:33
stekernmicroblaze too...18:34
stekernwith the same gcc I mean18:34
stekernblueCmd: ah, I think for libcalls, you actually have to manually tell gcc about the clobbers for libcalls18:59
stekernehm, minus one for libcalls18:59
stekerntake a look at CALL_INSN_FUNCTION_USAGE19:02
stekernand you can look at the nios2 port for an example where it's used together with the __tls_get_addr19:03
stekern...except, there emit_library_call isn't used...19:07
stekernand open code that function call was something you tried and failed, right?19:15
stekernthis bugreport looks strikingly similar to our problem: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5069119:28
blueCmdstekern: yeah, i tried a bunch of different ways19:32
blueCmdif I force the libcall to save stuff on the stack it sort of looks ok, but it might be a fluke19:32
blueCmdstekern: interesting bug report19:34
stekernyou can sprinkle some debug_tree (rtx) around the libcall to get some more info what's going on internally19:35
blueCmddebug_tree - didn't know about that one19:36
blueCmdstekern: thanks for finding that bug report, I had something very close to that but it helps knowing I'm on the (hopefully) right track19:56
stekernmy pleasure19:59
stekernI think I'm finally done with my libreoffice deathmatch (aka updating it with the atomic instructions)20:17
stekernblueCmd: http://pastie.org/9098453 <- wut, the most important package for or1k is missing!?!20:33
blueCmdstekern: hah20:36
stekernso, another question, is the libffi complete enough for glib?20:44
blueCmdwell, it runs gtk20:45
blueCmdso I would say so :)20:45
stekernnice20:45
blueCmdit's quite hallow though20:45
stekernI want irssi20:45
blueCmdbut it should work fine for most cases20:45
stekernwhich needs glib (and IIRC glib was the showstopper last I tried to compile it)20:45
blueCmdapt-get build-dep irssi was successful, I can build it if you want20:46
blueCmdfix gcc and I will build irssi - deal? :)20:46
stekernhaha20:46
blueCmdstekern: mind taking another look what I have? I have cleaned stuff up a bit20:48
stekernhaven't you noticed that I'm doing my best to try to help you fix gcc? ;)20:48
stekernnot sure how much I help or just throw you of in wrong directions though =)20:48
blueCmdstekern: hah, I do appricate it20:48
blueCmdso, I did what PA did for legitimitate_constant_p: return false for TLS GD and LD20:49
blueCmdthat makes the code stop recognizing TLS relocations at all (at least GD and LD, haven't looked at IE and others) and just default to GOT relocations20:49
stekernhmm, but only for constants right?20:51
blueCmdwell, the symbol is the constant - no?20:52
blueCmdhttp://e88ae51e479a312e.paste.se/20:53
stekernumm, yes I suppose...20:53
blueCmdthat's the output20:53
blueCmdhttp://e35bb3e0464458ae.paste.se/20:54
stekernhttp://pastie.org/9098504 <- hmm, interesting20:54
blueCmdhah20:54
blueCmdeverything odd might be this TLS bug :)20:55
blueCmdit isn't, but I might just as well motivate myself with that thinking20:55
stekernyou just want me to keep focused =)20:55
stekerncould be a mor1kx bug too20:56
stekernbut I got this: http://pastie.org/909851220:57
blueCmdooh!20:57
blueCmdthat's nice :)20:57
stekern4 days!20:57
blueCmdhttp://gcc.gnu.org/bugzilla/attachment.cgi?id=25459 nice that the bug had a smaller test case21:02
stekernblueCmd: but the pa change added the thing in emit_move_sequence too21:02
stekernah, that's what you are doing in expand_symbol_ref?21:02
stekernwhat I don't like about the GNU changelogs is that they only tell what is being done, not why21:05
blueCmdstekern: emit_move_sequence should already emit for TLS21:06
blueCmdbut it makes sense that we should add something there as well21:06
blueCmdstekern: did you even try to install irssi? :)21:08
blueCmdstekern: I finished building it and got a error saying 'package already uploaded to repo'21:08
stekernhaha, no21:08
stekerndoh...21:09
stekerntightvncserver seems to work fine on real iron to21:10
blueCmdcool!21:11
blueCmdstekern: if you build http://a3f3f8689ba7a707.paste.se/ and run that, does it return the same number 3 times?21:17
blueCmdon or1k that is21:17
blueCmdin qemu it's totally scrambled21:17
stekerndoes it matter if I build it natively or cross-compile it?21:17
stekernit really feels a bit unreal to be running 'serious stuff' like this on a FPGA-devboard21:18
stekernand this easily21:19
stekern(from a user perspective I mean, there's some solid work behind from your part)21:19
stekern+it21:19
stekerneverything doesn't go completely smoothly though =) http://pastie.org/909855121:20
blueCmdstekern: just run it should be fine21:23
stekernhttp://pastie.org/909855721:23
blueCmdok, great21:24
blueCmdthe first one not so great21:24
blueCmdstekern: see if you can strace irssi21:24
blueCmdok. so emit_move_insn calls targetm.legitimate_constant_p with the comment:21:25
blueCmd    4 »·  /* If the target's cannot_force_const_mem prevented the spill,21:25
blueCmd    5 »·     assume that the target's move expanders will also take care21:25
blueCmd    6 »·     of the non-legitimate constant.  */21:25
blueCmdsetting cannot_force_const_mem to True for TLS related symbols makes a lot of stuff happen21:26
blueCmdhttp://787043bdaa30f2e4.paste.se/21:26
stekernhmm, I guess the unspec is one of the UNSPEC_TLS* there?21:28
blueCmdyes21:30
blueCmdUNSPEC_TLSGDHI21:30
stekernok... and it doesn't match movsi_tlsgdhi, because it's not and immediate anymore?21:32
stekerns/and/an21:32
stekernpa uses a "tld_symbolic_operand" predicate there21:34
blueCmdI don't know why it doesn't match, I'm reading http://gcc.gnu.org/onlinedocs/gccint/RTL-Template.html atm21:36
blueCmdimmediate_operand21:36
blueCmdThis predicate allows any sort of constant that fits in mode. It is an appropriate choice for instructions that take operands that must be constant.21:36
blueCmdeven chaning to 'general_operand' and '' doesn't do anything21:39
stekernah, I was just about to ask what happens if you change it to "" ""21:39
stekernbut does it ICE then too?21:39
blueCmdyes21:40
blueCmdsame error21:40
blueCmdbut where does it get the value of UNSPEC_TLSGDHI (i.e 10) ?21:40
blueCmdI wonder if maybe it's trying to evaluate the define_insn and fails there21:40
blueCmdmaybe I need a define_expn21:40
olofkFuck yeah! My wb_ram works on target now21:41
olofkI'm getting close to finishing my first board port21:41
stekernhttp://pastie.org/909858421:41
stekern^ end of the irssi strace21:42
blueCmdstekern: hah, please remove or1k_atomic from your printout21:42
blueCmdstupid person who implemented that21:42
blueCmdalso, do LD_DEBUG=all irssi once21:43
blueCmdstekern: I commented out the emit_insn (gen_movsi_tlsgdhi (dest, x)); and emit_insn (gen_movsi_tlsgdlo (dest, dest, x));21:44
blueCmdofc the code doesn't run, but the function call shows as correctly generated21:44
blueCmdwhich is pretty exciting21:45
stekernok, that's progress21:46
blueCmdI'm wondering if the relocation tlsgdhi gets stuck in the constant_p legitimate thing21:46
blueCmdhttp://a6e394065fe64558.paste.se/ that's the current output (with the emits reenabled)21:47
blueCmdhttp://81a95059389da9f6.paste.se/ the output without it enabled21:47
blueCmdhttp://1594ab255ffd9084.paste.se/ (the same as the last one but with aligned lines)21:47
olofkLimb: If you're still interested in my wb_ram component you can try this one https://www.dropbox.com/s/w7dnlu5sgyx5v7j/wb_ram.tar.gz21:49
_franck__stekern: would you mind pushing your ps2 core to orpsoc-cores ?21:49
stekern_franck__: not at all, it's due for my atlys port anyway21:50
blueCmdstekern: mips wraps the symbol in an 'unspec_address'21:50
_franck__stekern: great I only miss ps2 and spi then my board will have full support. I might add ac97 if I have enough room, I'm 94% full right now :(21:53
stekernblueCmd: http://pastie.org/9098623 <- irssi strace with the or1k_atomics filtered out22:04
blueCmdstekern: aha!22:05
blueCmdstekern: you're running a kernel, right?22:05
blueCmd;)22:05
stekernmmm, it seems like a valid assumption ;)22:05
blueCmdhttps://github.com/bluecmd/or1k-linux that kernel has all the awesome you need22:06
blueCmdyou will lose your uptime though :(22:06
stekernah, right the signal patch...22:07
stekernI'll just cherry-pick it from jonas master-next22:09
stekernI think I have all the other goodies22:09
stekernmy uptime :(22:11
blueCmdyou have my atomics and TLS?22:11
stekernyes22:12
blueCmdI guess you have those, otherwise you wouldn't be able to boot22:12
stekerndon't think anything would have worked without those ;)22:12
blueCmdYeah22:12
stekernnow irssi gave me a bus error instead ;)22:15
blueCmdstekern: repeat!22:15
blueCmdfor gcc, I'm close - I can feel it! (I hope :D)22:16
blueCmdI just need to figure out how to make the second pass of legitimate pass for the tldgd relocs22:16
stekernthat second pass is always a b*tch22:17
stekernI remember I had a lot of problems with the got things with that22:18
stekernand in llvm, it was no troubles at all to add them...22:18
stekernwhy am I running 'grep -v or1k_atomic irssi.strace' on the board and not on my ws?22:19
stekernhttp://pastie.org/909865322:22
stekernit's the same, but killed with different sig22:22
stekernlemme double check my kernel build22:23
blueCmdI want to be able to get from my symbol X to it's "parent" to see if it's in an UNSPEC22:28
blueCmdI wonder if that's possible22:29
stekernmaybe, I don't know how though (at least not from the top of my head)22:31
stekernnow it's segfaulting again...22:34
stekernprobably just a coincident of which address get screwed up22:35
stekern_franck__: https://github.com/openrisc/orpsoc-cores/commit/38c047e5e634cbcbb2b19112284a8e2cb0d3144222:51
blueCmdstekern: try running wuth LD_DEBUG22:55
--- Log closed Tue Apr 22 00:00:16 2014

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