@juliusb | updated arch spec: https://www.dropbox.com/s/jsavdj0zve3i7v0/openrisc-arch-1.0-draft.pdf | 03:00 |
---|---|---|
-!- maximi89_ is now known as maximi89 | 04:20 | |
@stekern | juliusb: nice | 04:21 |
@stekern | or1200-simple passes as well now, I had to seperate the lsu address from the "real" alu results that is registered onto mem stage, since the alu result might be needed for pipeline forwarding | 05:05 |
@stekern | now the first fail is in or1200-basic, and that test is really annoying | 05:11 |
@stekern | a long series of tests that all depend on the result of the previous test and just one check to see if the end result match up | 05:12 |
@stekern | man, hazard handling is a b*tch... | 07:58 |
@olofk | juliusb: Great. I'll try to read through it today and give you comments | 09:39 |
@stekern | bah, I realise that the second mail about returning structs was a bit confused too... | 09:42 |
@stekern | if your not returning by value your not really returning a struct, but a pointer... | 09:43 |
@stekern | nevertheless, the original text should still be there, the address is also put in the RV-register. | 09:49 |
@olofk | hmm.... I think yaml is a hot candidate for next version of orpsoc's core descriptions. I was shown some problems with python's configparser | 12:44 |
@olofk | juliusb: You're the yaml expert, right? :) | 12:44 |
@juliusb | olofk: I've used it now and then, yes | 13:19 |
@juliusb | actually, i've used it a lot with the Python parser | 13:25 |
@juliusb | those two things together are awesome | 13:25 |
@juliusb | phew, I finally waded through the carry/overflow discussion | 15:57 |
@juliusb | if people are happy I can roll this into the or1k spec update draft too | 15:59 |
@juliusb | I'm with jeremybennett on asking rdiez to cross-post. He's being purposefully annoying and I think his arguments for why he does it aren't convincing | 16:05 |
jeremybennett | juliusb: Thanks for the support | 16:45 |
@juliusb | Yep, and good on you for telling him to pull his head in | 17:32 |
@juliusb | hmm, i just realised that may have been Australian vernacular you're not familiar with | 17:33 |
@juliusb | :) | 17:34 |
@juliusb | http://www.urbandictionary.com/define.php?term=Pull%20Your%20Head%20In&defid=6689830 | 17:34 |
jeremybennett | juliusb: Always useful to broaden one's vocabulary. | 17:38 |
@juliusb | one thing I wanted to ask was whether we think the multiply and overflow stuff is solid enough (pgavin only put it up on the wiki a few days ago) to roll into the current architectural updates | 17:38 |
@juliusb | it seems well thought through though | 17:38 |
@olofk | jeremybennett: Yes, you have my support too, and thanks for dealing with it. I haven't had anything constructive to add to the argument, so I have kept quiet | 17:57 |
jeremybennett | juliusb: could you give me a wiki pointer | 18:28 |
jeremybennett | olofk: Thanks for your support. Even if you don't have anything to say, it might be worth a one liner response to say you agree. If Ruben starts to see the whole community agrees, he might change. He has some good stuff to say, he's just being annoying how he says it. | 18:29 |
@juliusb | jemarch: http://opencores.org/or1k/Architecture_Specification#Change_Use_of_Carry_and_Overflow_Flags_by_Multiply_Instructions | 18:52 |
@juliusb | whoops | 18:52 |
@juliusb | that was meant for the ex-jeremybennett | 18:52 |
@juliusb | jeremybennett: http://opencores.org/or1k/Architecture_Specification#Change_Use_of_Carry_and_Overflow_Flags_by_Multiply_Instructions | 18:59 |
jeremybennett | juliusb: Yes - that looks clean. The CYE flag is a good idea, but remember it will have a knock-on effect for other opcodes. | 19:02 |
jeremybennett | Just thinking this through. On the whole arithmetic exceptions are used for erroneous behavior, like divide by zero, because of the high cost of an exception. | 19:03 |
jeremybennett | You really don't want CYE triggering when doing a multi-word addition. So you could be in a situation where you are forever turning CYE on and off. | 19:04 |
jeremybennett | l.div and l.divu need similar changes. | 19:07 |
jeremybennett | BTW - where should commentary go? On the talk page I presume. | 19:10 |
jeremybennett | Comments added to the talk page | 19:35 |
@juliusb | thanks | 19:39 |
@juliusb | I think we should have an exception triggerable by a divide-by-zero | 19:40 |
@juliusb | seperately | 19:40 |
@juliusb | or maybe, have an arithmetic exception config register, where you pick if overflow, carry or divide-by-zero trigger exceptions, then when they do, trip a range exception, and have another register indicating what caused the range exception | 19:41 |
@juliusb | that we we keep the single exception bit in the SR and have a very configurable, neat way of dealing with arithmetic exceptions | 19:41 |
@juliusb | similar to the floating point stuff, where you can trigger on various things | 19:42 |
@juliusb | however, it probably adds an extra bit of state you'll need to maintain between contexts | 19:53 |
@juliusb | but, we already have a few of those don't we? MAC SPRs are one | 19:54 |
@juliusb | My suggestion doesn't go to the case where CYE needs to be switched off for multiword addition | 19:59 |
@juliusb | you could make it user R/W and have GCC emit instructions which clear the bit before doing a known multi-word addition | 20:00 |
@juliusb | GCC doesn't emit add-with-carry now | 20:00 |
@juliusb | so, does long long additiion fail? | 20:00 |
jeremybennett | Have you looked in gcclib at the hand-written assembler? | 20:18 |
jeremybennett | sorry libgcc I mean | 20:18 |
@juliusb | not lately... | 20:22 |
jeremybennett | you might find it is used there... | 20:22 |
@juliusb | there's or1k-specific stuff in libgcc? | 20:22 |
jeremybennett | Yes - assembly functions for soft-mul etc. | 20:22 |
jeremybennett | At least I think that's where they are. | 20:22 |
jeremybennett | They are somewhere in there! | 20:23 |
@juliusb | Nope, none in or1k-gcc/libgcc/config/or1k | 20:23 |
@juliusb | appears to not be used anywhere | 20:27 |
jeremybennett | Ha ha - you've just found a bug I think. Hold on while I check... | 20:30 |
jeremybennett | What should this print out? | 20:30 |
jeremybennett | #include <stdio.h> | 20:30 |
jeremybennett | main () | 20:30 |
jeremybennett | { | 20:30 |
jeremybennett | long long int x, y, z; | 20:30 |
jeremybennett | x = -1LL; | 20:30 |
jeremybennett | y = -1LL; | 20:30 |
jeremybennett | z = x + y; | 20:30 |
jeremybennett | printf ("z = %lld\n", z); | 20:30 |
jeremybennett | } | 20:30 |
jeremybennett | Or1ksim at least gets it wrong. | 20:35 |
jeremybennett | But a look at the code suggests it might be the printf that is the problem? | 20:35 |
jeremybennett | I think it fails to correctly take z as being of type long long | 20:36 |
@juliusb | im compiling some stuff and looking into it | 20:39 |
jeremybennett | That could be it failing to recognize "ll" as a length modifier. | 20:39 |
@juliusb | it looks right | 20:39 |
@juliusb | but just checking it in my own head | 20:39 |
jeremybennett | It should print -2, but Or1ksim prints -1 | 20:39 |
@juliusb | it's not using carry, it's checking if the lower 32-bits wrapped and if so adding 1 to the addition of the upper 32-bits | 20:39 |
jeremybennett | Agreed - I thought it would use a library routine, but it does not. Clearly somewhere optimization could be applied! | 20:40 |
@juliusb | it's not using a library routine for me | 20:40 |
jeremybennett | Nor me. | 20:40 |
jeremybennett | There is however the question of the printf bug. That might be a newlib limitation of course. | 20:40 |
@juliusb | it looks like the upper 32-bits of a long long argument is passed in r3 and lower 32-bits in r4 | 20:41 |
jeremybennett | In my version, it's passed in r4/r5 (r3 is used for the printf string) | 20:44 |
@juliusb | http://pastie.org/5407516 | 20:44 |
jeremybennett | r5 has the lower 32-bits | 20:44 |
jeremybennett | How was that compiled to get that listing? | 20:45 |
@juliusb | or1k-elf-gcc -c -O2 | 20:45 |
@juliusb | then or1k-elf-objdump -d | 20:45 |
@juliusb | Anyway, question answered, long long maths should work | 20:47 |
@juliusb | you could skip the branch, though, if it used l.addc | 20:47 |
jeremybennett | Yes - but printf doesn't print them out properly, at least with newlib and Or1ksim. | 20:47 |
jeremybennett | Are the comments in pastebin hand-added by you? | 20:48 |
@juliusb | Yes | 20:48 |
@juliusb | Sorry, I should have mentioned, that I annotated it | 20:48 |
jeremybennett | Ah - I thought it must have been some whizzo gcc 4.8 output mode, which put intelligent comments into the code it generated. | 20:48 |
@juliusb | haha, I wish | 20:49 |
@juliusb | must run, bye | 20:50 |
jeremybennett | bye | 20:51 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!