IRC logs for #openrisc Thursday, 2016-01-21

--- Log opened Thu Jan 21 00:00:56 2016
-!- Netsplit *.net <-> *.split quits: andrzejr_00:10
-!- Netsplit over, joins: andrzejr_00:11
daliasis there any way on or1k to move the value of flag (F) to a gpr without just branching on it ?16:40
poke53281dalias: l.mfspr r6,r0,SPR_SR16:56
poke53281to save the SR in register 616:56
poke53281the F Flag is the bit no 9.16:58
daliasgreat thanks16:58
daliaswhat is r0 doing there?16:58
poke53281F = SPR_SR & (1<<9) ? true:false16:58
poke53281an offset16:59
-!- Empyrium_ is now known as Empyrium16:59
daliasi'm overhauling musl's atomics so llsc archs only provide a_ll and a_sc16:59
daliasbut since gcc inline asm can't specify a flag as the output of an asm block, we need to store the flag to a gpr16:59
daliasthis seems like a waste but for most archs so far gcc generates much better code with a_ll and a_sc than with a big llsc loop written in asm17:00
poke53281SPR_SR is just a fixed register number. 0x0 I guess17:00
poke53281r[(ins >> 21) & 0x1F] = this.GetSPR(r[(ins >> 16) & 0x1F] | (ins & 0xFFFF));17:00
daliasand it makes it so we get all the variants (a_cas, a_swap, a_fetch_add, a_and, ...) for free from just 2 tiny asm fragments :)17:00
daliasah is SPR_SR a symbolic constant whose value i need to fill in?17:01
poke53281SPR_SR = 17; // supervision register17:01
poke53281SPR_SR is probably already a const number in the assembler.17:02
poke53281Try it17:02
daliashmm the pdf says SR is only available in supervisor mode..?17:03
poke53281Oh damn17:03
poke53281also to read?17:03
poke53281because this register contains also the carry flag and so on.17:04
daliasi dunno17:04
daliasmaybe it's wrong17:04
daliasunder the insn l.mfspr it says "no exceptions"17:04
daliasbut that must be wrong17:04
daliasbecause mtspr also says no exceptions17:04
daliasbut it can change mmu state and all sorts of stuff17:05
poke53281Therefore I think it is only a problem when you write to it via l.mtspr17:05
poke53281But actually I am puzzled now. My emulator doesn't care about it. :)17:06
poke53281Look at this emulator. Have to leave now. Back in 2 hours.17:09
poke53281this is the reference emulator17:09
poke53281The TODO does not really help.18:50
poke53281As far as I understand you can't read this parameter in user mode. But the author of these lines is not sure if thzis is correct. .18:52
poke53281so when the SUMRA flag is set it is allowed to be read in user mode.18:53
poke53281Yes, and this is exactly the flag, that defines if the SPR_SR can be read in user mode.18:54
poke53281Otherwise exception.18:54
poke53281and kernel handling.18:55
poke53281I don't know if this flag is set under Linux. But I guess so.18:55
poke53281I clone the Linux repository and search for SUMRA. This will take a few minutes.18:56
tseimanI just wonder if somebody has an idea what is right way in orpsoc - wb_intercon.conf to define a core which is WB master as well as slave19:56
stekerntseiman: just define a separate master and slave20:34
stekernand then hook up the module interfaces accordingly to your core20:34
tseimanOk - is the IO address then the same ?20:35
_franck_olofk: we now have a dependency on yaml right ? so I installed python-yaml and it's fine for python 2.7. But for python 3.4 it still says: "ImportError: No module named 'yaml'"20:35
tseimanbecause this is for (as i understood from the sd-card core) DMA20:35
_franck_olofk: so I stayed with python 2.7 and now I have "AttributeError: 'File' object has no attribute 'rfind'" I'll look at that tomorrow if you don't by then20:36
tseimanstekern: ok i have to check & understand that first before proceed to ask more question ;-) - i try to integrate the SD card core20:37
_franck_tseiman: look at vga or ethernet here:
stekerntseiman: defining IO address space only makes sense for slaves20:38
_franck_they both have dma20:38
tseimanstekern: this is quiet hard pice of cake20:38
tseimanstekern: ok - thanks20:38
tseimanyes that is true - that is as well why i was woundering20:39
tseimanis more a question how things are matching together (especially because there some helpfull script do some of the work) - some example is good to see how it can be done20:40
tseimani was seeking arround already but haven’t found example yet - but i’ll check the points you have been referring to20:41
tseimanthanks .. lering curve is quiet steep ;-)20:42
tseiman… learning …20:42
olofk_franck_: Oops... I totally forgot about the pyyaml dependency. Need to add a check for that in the configure script21:48
olofk_franck_: What command did you run to get the error?21:53
--- Log closed Fri Jan 22 00:00:57 2016

Generated by 2.15.2 by Marius Gedminas - find it at!