<stekern>
I'm mostly interested in how aggregates are passed by value, but it looks like it is passed in registers if it fits and on stack if it doesn't
<stekern>
i.e. it's never split between registers and stack
<wpwrak>
passing structs seems to be hard to grok. i remember a project a long time ago, where the stack aligned got out of sync after passing a struct. that was with a proprietary compiler. took us a while to realize what was going on. then we wrote them a nice long bug report with examples.
<stekern>
seems like there is a lot of variation between architectures what the calling convention for it is
<wpwrak>
they responded with a workaround that indeed made our examples work but did nothing about fixing the bug. so we made a trivial change, watched it fail again, and sent them the updated bug report. then, silence. for months. (well, not exactly silence, of course, there had been increasingly heated communications between managers.)
<wpwrak>
still ... it's not *that* difficult ;-)
<stekern>
yeah, agree ;)
<wpwrak>
back then, we jokingly proposed to just buy the company that made that compiler, so that we could force them to fix the bloody thing. our project was pretty big, with its value probably significantly exceeding the value of that company.
<stekern>
so, did they fix it in the end?
<wpwrak>
ah yes, they first fixed it in their sun version and were eventually pressured to also fix it in their r6000 version. (the client company was IBM, so it had to be a weird platform :)
<xiangfu>
Jia, the 4.5.4 works just fine. with RTEMS/FLickernoise.
<GitHub186>
[scripts] xiangfu pushed 1 new commit to master: http://git.io/Fc6xOw
<GitHub186>
[scripts/master] lm32 toolchain: update gcc to 4.5.4 - Xiangfu Liu
<Jia>
xiangfu: 4.6.3 I fixed generate the same code as 4.5.4, it must be another bug...
<stekern>
Jia: the generated code isn't _excactly_ the same, notice the extra "add fp, fp, sp" before calli bar in 4.5.4
<Jia>
stekern: yeah, I knew that, maybe it is the other bug, and I'm analyze lm32.md
<Jia>
analyzing
<stekern>
ah, but the result seems to be the same still
<Jia>
some one commit a wrong patch without test!
<Jia>
if lm32 port maintainer is 'strong', it won't happen
rejon has joined #milkymist
<stekern>
Jia: but 4.5.3 seems to generate the same code as 4.5.4 as well
Gurty has quit [Ping timeout: 265 seconds]
<Jia>
stekern: yeah, 4.6.0 generate diff code.
<Jia>
- addi fp, r0, 12
<Jia>
- add fp, fp, sp
<Jia>
+ or fp, sp, r0
<Jia>
+ addi fp, fp, 12
<stekern>
but what is the problem with the generated code, is it triggering some test to fail?
<stekern>
I mean, both versions do the same thing: fp = sp + 12
<Jia>
lm32 has no testcase for target...
<stekern>
ah, sorry didn't read what you wrote earlier properly, 4.5.4 and 4.6.3 produce the same code, thus the problem with 4.6.3 must be something else ;)
<Jia>
I think I find it, but not the reason. This bug is there so looooooooooooooooong a time, legitimate never be used in 4.5, it is opened in 4.6, so, it buged.
<Jia>
lekernel: clang -O2 -Wall -I. -s -o bin2hex bin2hex.c, is this clang lm32-clang or x86-clang?
<Jia>
xiangfu: make -C /opt/milkymist/milkymist/tools use clang, is it x86-clang?
<Jia>
lekernel: how I can get them, manaul or some auto way?
<lekernel>
clone the git repository and use quilt
<lekernel>
but xiangfu's script really should do that for you
antgreen has quit [Read error: Connection reset by peer]
<lekernel>
I don't know why it seems not to work for you
<Jia>
quilt?! I didn't install on my system ,is it the problem?
<lekernel>
probably not, or at least I hope that xiangfu's script give you an error in this case instead of silently failing
<Jia>
I'm afarid not.
* Jia
will delete all files and restart over...
<Fallenou>
hehe, hard to get one's environment up and running to compile firmware :)
<Jia>
it really spend time...
<Fallenou>
that's the same pain for every project unfortunately
<Fallenou>
(embedded project)
<Fallenou>
you need toolchains, packets, dependencies etc
<Jia>
I still get just 4 patches...
<Fallenou>
patches sometimes
<Jia>
I write a script for our proj(my job), and I FORECE all of employee use rhe same environment
<Jia>
It is really a trouble
<Fallenou>
we had troubles here when upgrading our ubuntus =)
<Jia>
embedded projects are all messsssssssssss
azonenberg has joined #milkymist
<lekernel>
Jia: check how xiangfu's script is patching rtems...
* Jia
open and start reading xiangfu's *.sh
<lekernel>
Jia: also, gcc has a test suite which could give more exhaustive/better coverage than just trying to run existing software. I have never used it though.
<lekernel>
same for clang/llvm
<Jia>
lekernel: may you tell me witch script?
<Jia>
lekernel: gcc testsuit need a native run... I think
<wpwrak>
whee ! one more commit until perfection :)
<larsc>
based on the rate of the previous commits we could try to extrapolate this joyful occasion
<wpwrak>
yeah, i'm not sure i'll even have enough time to cool down the champage to an acceptable temperature :)
<wpwrak>
i wonder if FN will run with the system sebastien is using. if not, then it'll be a while until we can actually put it to good use. which would be a pity. i have high hopes for video quality with 32 bpp.
kilae has joined #milkymist
<stekern>
what's the shortest path to run something like int main(void) { printf("hello world"); } in qemu?
<lekernel>
with rtems I think
<stekern>
ok, without using rtems ;) using the "lib" in bios?
<stekern>
I mean, using the "libs" that bios is using