Saturday, 2022-07-09

ghostmansdOK it seems macro'd width for sw/ew work, at least I get the correct results with this code:
ghostmansdPredicates will be way more tricky since I'll have to make binutils aware of our special stuff, like "1<<r3", "r3", "~r3", etc.14:51
ghostmansdThis "predicates" section include both m/sm/dm and ff/pr modes, though. The most challenging part would be 1<<r3 et al. I'm not sure binutils allow to handle these in a simple way.14:55
ghostmansdlt/nl/ge/etc. will also be tricky somewhat, since they don't expand to constants but rather symbols. But for these I at least have an idea in mind.14:56
ghostmansdEven this idea would be a bit of hackery with global context, though.15:02
ghostmansdFortuanately the code already has some of these hacks, so I'm not the first to corrupt it. :-)15:02
ghostmansdlkcl, some updates ^^^15:02
ghostmansdAlso, how often irclong gets the entries? I don't see all the entries I wrote, but I see them in both phone and laptop.15:05
ghostmansdAh it got entries already. Never mind.15:05
ghostmansd[m]A funny typo, irclong... Judging from the name it should take a while before it collects the entries.15:06
lkclghostmansd[m], if you're typing "irclong" you've been focussing on c for too log.15:17
lkclyes it's a cron job, 5 minutes15:18
lkcldo drop the example into the bugreport, remember pastebin is not under our control: anything in it is lost (for archive purposes) immediately15:19
ghostmansd[m]lkcl, heh, I even dropped a link to pastebin as is, w/o pressing the submit button15:30
ghostmansd[m]lkcl, dropped the code to the task15:34
ghostmansdOut of curiosity. How does one even define "1<<r3" as macro?15:51
ghostmansdAha, I see. This is as simple as `.set cocojumbo, 1<<r3`. Still, a difficult thing to parse.16:21
ghostmansdError: invalid operands (*ABS* and *UND* sections) for `<<' when setting `cocojumbo'16:21
ghostmansdStill this happens upon usage, not upon the ".set" directove, so it's technicaly a valid code.16:22
ghostmansdAnd, likely, the calculation is deferred...16:22
ghostmansdYeah a damn tricky case. I assume that's the same for all predicates which have some operator.16:23
lkclghostmansd, it's the only one.16:38
ghostmansd~r30, ~r1016:39
ghostmansdthese also have an operator16:39
ghostmansd~r3 too16:39
lkclbasically it turns a vector operation into a single scalar operation, where r3 picks the element.16:39
lkclsv.add/m=1<<r3     GPR(RT+r3) = GPR(RA+r3) + GPR(RB+r3)16:40
lkclghostmansd, ah yeah16:40
ghostmansdIt'd have been somewhat simpler if those are not operator-based16:41
ghostmansdAnyway, I think it's doable, just a bit slower then just a simple ASCII-word-without-punctuation16:42
ghostmansd(that's to avoid horrifying you with some damned regex, lol)16:42
ghostmansdLuke, any docs I can refer to about these modes?16:44
ghostmansdI mean, links etc.16:44
lkclthat's not a mode, it's predicate selection16:44
lkcl1 sec16:44
ghostmansdYeah under mode I mean ff/pr etc.16:45
lkclah 1 sec16:45
lkclthere's 4 pages16:45
lkcl (ignore that one for now)16:46
lkcl (ignore that one too)16:46
lkclif you want to know *about* the modes (what they do)16:47
lkclstart around there16:47
ghostmansdAha, perfect16:47
ghostmansdActually I also intend to use these links as tips for binutils developers16:48
ghostmansdI'm going to raise the discussion on the mailing list about this stuff16:48
ghostmansdFirst, I'm a bit unsure how to do it in an elegant way16:48
ghostmansdSecond, I have an idea how to do it in an unelegant way, but I suspect it would look like a real crap16:49
lkclwell if it helps try using !r10 !r30 !r3 instead of ~r316:49
ghostmansdI think it won't :-)16:50
ghostmansdOr, well, it will perhaps help, but still would need some tricks16:50
ghostmansd(and I think these tricks will be the same with ~ and <<)16:50
lkcldmitry: how about moving the symbol to the lhs?18:22
lkcland something else (convenient) instead of 1<<r318:24
lkclor just sm=1r3 or sm=sr3 (shifted r3) or sm=u for "unary" would do18:27
lkclanything to avoid expressions on the rhs18:28
ghostmansd[m]lkcl, this would do the trick for sm/dm/m, yep18:51
ghostmansd[m]And 1<<r3, I've been thinking about it too, having something non-operands-related would also work18:52
ghostmansd[m]On the other hand, ~sm=r3 makes it look like there's a different mode instead of just a different predicate18:53
ghostmansd[m]I'm not sure whether it satisfies my need for beauty18:53
ghostmansd[m]That said, the beauty is in the eye of the beholder18:54
ghostmansd[m]And, since I'm a huge fan of HoMM III, here's the beholder I mean:18:55
lkclwhy does it remind me of Monsters University Scare Cards?
lkcl"~sm=r3" can be interpreted from english to the words (in order), "inversion of source-mask r3"19:00
lkclwhich makes sense19:00
lkclrather than "source-mask is inverted r3"19:00
lkcl"m=u3" into english "mask is unary r3"19:01
ghostmansd[m]> why does it remind me of Monsters University Scare Cards?19:16
ghostmansd[m]Perhaps they got an inspiration from HoMM?19:16
ghostmansd[m]Hm, your suggestion makes sense, yeah. I suggest to have a day or two for Alan's reply. If things are doable with little blood, I'd go for it; otherwise let's think of the overall convention.19:20
ghostmansd[m]This _seems_ simpler than the register-related stuff; I might be wrong, though.19:21

Generated by 2.17.1 by Marius Gedminas - find it at!