IRC logs for #openrisc Tuesday, 2013-05-21

--- Log opened Tue May 21 00:00:08 2013
stekernheeeelp, I'm sinking deeper and deeper down into gccs RTL logic...02:45
* hno gets a lifewest for stekern 06:00
stekernphew, thanks06:02
stekernthis is what I brought with me from the muddy waters, this line seems to be misgenerated: https://github.com/openrisc/or1k-gcc/blob/or1k/gcc/expr.c#L341706:18
stekernthe GEN_FCN macro expands to: #define GEN_FCN(CODE) (insn_data[CODE].genfun)06:19
stekernand the problem is that the second parameter to that function (y) is not passed correctly06:20
stekernactually, it tries to pass the second parameter on the stack for some reason, but it shouldn't06:28
stekernlet's see if I can create a smaller test case out of that06:30
stekernoh, it actually should, it's a var arg function06:44
stekernor the function pointer is declared as such06:44
stekernbut the function that is called doesn't grok that it is06:45
stekernthis of course works by accident on archs that handles var args by filling the remaining registers and then move on to the stack06:58
stekernbut that's not how we do it06:58
stekernannoyingly, I can't find the definition for the function that is called (gen_movsi), it's probably generated in some tricky way, because I find it when objdumping cc107:01
stekernand demangling that name (_Z9gen_movsiP7rtx_defS0_) gives: gen_movsi(rtx_def*, rtx_def*)07:04
stekernso it seems like it's defined as a non-vararg function07:05
stekernah, found the definition (I wasn't smart enough to grep in the build dir first)07:12
stekernand the definition is: rtx gen_movsi (rtx operand0, rtx operand1)07:12
stekernso how the h*ll do we make this work?07:12
stekernhere's a smaller test case: http://pastie.org/793790407:17
stekernpretty obvious it's not guaranteed to work, but that's what's happening in gcc07:17
stekernlooks like someone have noticed this before: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1208107:33
stekern10 years ago...07:34
stekernand here: http://www.mail-archive.com/[email protected]/msg87893.html07:51
stekernI wonder why we have that odd ABI for passing var args08:16
hnostekern, that bug reports ends in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081 where there is a proposed patch, with a positive comment and then silence. (2007). Still open.14:42
olofkAnd so a new chapter of my life has begun18:26
stekernhno: yup, I've applied that patch, but I seem to have broke my ws right now so can't test if it works19:22
stekernit should work though19:23
stekernolofk: congrats!19:23
stekernI've got my onda tablet today btw19:23
hnoA31?19:25
hnostekern, when you get to test the patch please give feedback. Might kick it alive again.19:26
olofkCan anyone give me some hints for how to get usb blaster running under linux. Don't have any hardware yet, but I want to minimize potential problems at the SoCKIT workshop19:39
stekernhno: yes, a3120:09
stekernolofk: I haven't had any major problems with it, some permissions and a need to restart the jtag server I think is all the problems I've ever had with it20:11
stekernthe screen is preety good on this device at least20:20
stekern...and I still haven't learned how to write with on-screen keyboards ;)20:31
hnoso not you just need to figure out how to master the AE100 :)21:27
--- Log closed Wed May 22 00:00:09 2013

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