--- Log opened Tue May 21 00:00:08 2013 | ||
stekern | heeeelp, I'm sinking deeper and deeper down into gccs RTL logic... | 02:45 |
---|---|---|
* hno gets a lifewest for stekern | 06:00 | |
stekern | phew, thanks | 06:02 |
stekern | this 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#L3417 | 06:18 |
stekern | the GEN_FCN macro expands to: #define GEN_FCN(CODE) (insn_data[CODE].genfun) | 06:19 |
stekern | and the problem is that the second parameter to that function (y) is not passed correctly | 06:20 |
stekern | actually, it tries to pass the second parameter on the stack for some reason, but it shouldn't | 06:28 |
stekern | let's see if I can create a smaller test case out of that | 06:30 |
stekern | oh, it actually should, it's a var arg function | 06:44 |
stekern | or the function pointer is declared as such | 06:44 |
stekern | but the function that is called doesn't grok that it is | 06:45 |
stekern | this of course works by accident on archs that handles var args by filling the remaining registers and then move on to the stack | 06:58 |
stekern | but that's not how we do it | 06:58 |
stekern | annoyingly, 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 cc1 | 07:01 |
stekern | and demangling that name (_Z9gen_movsiP7rtx_defS0_) gives: gen_movsi(rtx_def*, rtx_def*) | 07:04 |
stekern | so it seems like it's defined as a non-vararg function | 07:05 |
stekern | ah, found the definition (I wasn't smart enough to grep in the build dir first) | 07:12 |
stekern | and the definition is: rtx gen_movsi (rtx operand0, rtx operand1) | 07:12 |
stekern | so how the h*ll do we make this work? | 07:12 |
stekern | here's a smaller test case: http://pastie.org/7937904 | 07:17 |
stekern | pretty obvious it's not guaranteed to work, but that's what's happening in gcc | 07:17 |
stekern | looks like someone have noticed this before: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081 | 07:33 |
stekern | 10 years ago... | 07:34 |
stekern | and here: http://www.mail-archive.com/[email protected]/msg87893.html | 07:51 |
stekern | I wonder why we have that odd ABI for passing var args | 08:16 |
hno | stekern, 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 |
olofk | And so a new chapter of my life has begun | 18:26 |
stekern | hno: yup, I've applied that patch, but I seem to have broke my ws right now so can't test if it works | 19:22 |
stekern | it should work though | 19:23 |
stekern | olofk: congrats! | 19:23 |
stekern | I've got my onda tablet today btw | 19:23 |
hno | A31? | 19:25 |
hno | stekern, when you get to test the patch please give feedback. Might kick it alive again. | 19:26 |
olofk | Can 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 workshop | 19:39 |
stekern | hno: yes, a31 | 20:09 |
stekern | olofk: 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 it | 20:11 |
stekern | the screen is preety good on this device at least | 20:20 |
stekern | ...and I still haven't learned how to write with on-screen keyboards ;) | 20:31 |
hno | so 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!