--- Log opened Thu Jan 21 00:00:56 2016 | ||
-!- Netsplit *.net <-> *.split quits: andrzejr_ | 00:10 | |
-!- Netsplit over, joins: andrzejr_ | 00:11 | |
tseiman | Hello | 16:26 |
---|---|---|
dalias | is there any way on or1k to move the value of flag (F) to a gpr without just branching on it ? | 16:40 |
poke53281 | dalias: l.mfspr r6,r0,SPR_SR | 16:56 |
poke53281 | to save the SR in register 6 | 16:56 |
poke53281 | the F Flag is the bit no 9. | 16:58 |
dalias | great thanks | 16:58 |
dalias | what is r0 doing there? | 16:58 |
poke53281 | F = SPR_SR & (1<<9) ? true:false | 16:58 |
dalias | :) | 16:59 |
poke53281 | an offset | 16:59 |
-!- Empyrium_ is now known as Empyrium | 16:59 | |
dalias | i'm overhauling musl's atomics so llsc archs only provide a_ll and a_sc | 16:59 |
dalias | but since gcc inline asm can't specify a flag as the output of an asm block, we need to store the flag to a gpr | 16:59 |
dalias | this 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 asm | 17:00 |
poke53281 | SPR_SR is just a fixed register number. 0x0 I guess | 17:00 |
poke53281 | r[(ins >> 21) & 0x1F] = this.GetSPR(r[(ins >> 16) & 0x1F] | (ins & 0xFFFF)); | 17:00 |
dalias | and 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 |
dalias | ah is SPR_SR a symbolic constant whose value i need to fill in? | 17:01 |
poke53281 | SPR_SR = 17; // supervision register | 17:01 |
poke53281 | SPR_SR is probably already a const number in the assembler. | 17:02 |
poke53281 | Try it | 17:02 |
dalias | hmm the pdf says SR is only available in supervisor mode..? | 17:03 |
poke53281 | Oh damn | 17:03 |
poke53281 | also to read? | 17:03 |
poke53281 | because this register contains also the carry flag and so on. | 17:04 |
dalias | i dunno | 17:04 |
dalias | maybe it's wrong | 17:04 |
dalias | under the insn l.mfspr it says "no exceptions" | 17:04 |
dalias | but that must be wrong | 17:04 |
dalias | because mtspr also says no exceptions | 17:04 |
dalias | but it can change mmu state and all sorts of stuff | 17:05 |
poke53281 | Yes | 17:05 |
poke53281 | Therefore I think it is only a problem when you write to it via l.mtspr | 17:05 |
poke53281 | But actually I am puzzled now. My emulator doesn't care about it. :) | 17:06 |
dalias | :) | 17:08 |
poke53281 | https://github.com/openrisc/or1ksim | 17:09 |
poke53281 | Look at this emulator. Have to leave now. Back in 2 hours. | 17:09 |
poke53281 | this is the reference emulator | 17:09 |
poke53281 | re | 18:41 |
poke53281 | dalias: https://github.com/openrisc/or1ksim/blob/or1k-master/cpu/or32/insnset.c#L928 | 18:50 |
poke53281 | The TODO does not really help. | 18:50 |
poke53281 | As 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 |
dalias | :( | 18:52 |
poke53281 | so when the SUMRA flag is set it is allowed to be read in user mode. | 18:53 |
poke53281 | Yes, and this is exactly the flag, that defines if the SPR_SR can be read in user mode. | 18:54 |
poke53281 | Otherwise exception. | 18:54 |
poke53281 | and kernel handling. | 18:55 |
poke53281 | I don't know if this flag is set under Linux. But I guess so. | 18:55 |
poke53281 | I clone the Linux repository and search for SUMRA. This will take a few minutes. | 18:56 |
tseiman | I 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 slave | 19:56 |
stekern | tseiman: just define a separate master and slave | 20:34 |
stekern | and then hook up the module interfaces accordingly to your core | 20:34 |
tseiman | Ok - 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 |
tseiman | because this is for (as i understood from the sd-card core) DMA | 20: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 then | 20:36 |
_franck_ | olofk: http://pastebin.com/4EFnjNLX | 20:37 |
tseiman | stekern: ok i have to check & understand that first before proceed to ask more question ;-) - i try to integrate the SD card core | 20:37 |
_franck_ | tseiman: look at vga or ethernet here: https://github.com/openrisc/orpsoc-cores/blob/master/systems/atlys/data/wb_intercon.conf | 20:38 |
stekern | tseiman: defining IO address space only makes sense for slaves | 20:38 |
_franck_ | they both have dma | 20:38 |
tseiman | stekern: this is quiet hard pice of cake | 20:38 |
tseiman | stekern: ok - thanks | 20:38 |
tseiman | yes that is true - that is as well why i was woundering | 20:39 |
tseiman | is 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 done | 20:40 |
tseiman | i was seeking arround already but haven’t found example yet - but i’ll check the points you have been referring to | 20:41 |
tseiman | thanks .. 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 script | 21: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 irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!