This task is intended to cover binutils support for the scalar instructions including for byte reverse instructions. Full list: cntlzdm cnttzdm cfuged pextd pdepd brh brw brd setbc setbcr setnbc setnbcr
I've checked binutils and can confirm that instructions cntlzdm, cfugeD, pextd, pdepd, brh, brw, brd, setbc, setbcr, setnbc are all present as vanilla binutils instructions. All of them are missing in SVP64-related code, though. I'll add them.
(In reply to Dmitry Selyutin from comment #1) > I've checked binutils and can confirm that instructions cntlzdm, cfuged, > pextd, pdepd, brh, brw, brd, setbc, setbcr, setnbc are all present as > vanilla binutils instructions. > All of them are missing in SVP64-related code, though. I'll add them. there's also setnbcr, which should also be in binutils but not as SVP64 yet.
(In reply to Jacob Lifshay from comment #2) > there's also setnbcr, which should also be in binutils but not as SVP64 yet. Yeah I forgot to mention this one, thanks
added a full list in the top comment since we also forgot cnttzdm
I'll move on with this task next week (evenings or weekends). I expect not that many obstacles here, since I already had to update binutils SVP64 generated code in scope of some task we had recently; basically this should already mostly be covered.
(In reply to Dmitry Selyutin from comment #5) > I'll move on with this task next week (evenings or weekends). I expect not > that many obstacles here, since I already had to update binutils SVP64 > generated code in scope of some task we had recently; basically this should > already mostly be covered. brilliant. btw do check email from David. there is quite a lot of "small" work needed on SVP64 as well, we cannot move to libopid because it is too massive a change (and needs its own entire grant) remember that we don't yet have these in the simulator and therefore not in insndb, but the csv entries and OP_xx should be reasonably straightforward to add. * cntlzdm/tz should have the same OP_CNTLZ as existing instructions * set?bc* should have the same OP_SETBC
(In reply to Luke Kenneth Casson Leighton from comment #6) > (In reply to Dmitry Selyutin from comment #5) > > I'll move on with this task next week (evenings or weekends). I expect not > > that many obstacles here, since I already had to update binutils SVP64 > > generated code in scope of some task we had recently; basically this should > > already mostly be covered. > > brilliant. btw do check email from David. > > there is quite a lot of "small" work needed on SVP64 as well, > we cannot move to libopid because it is too massive a change > (and needs its own entire grant) Yes, this is a huge task. What's worse, it has several prerequisites; for example, fields and specs generation. > remember that we don't yet have these in the simulator and > therefore not in insndb, but the csv entries and OP_xx should > be reasonably straightforward to add. Luke, sorry, I'm probably missing what you mean. Could you explain further, please? $ for insn in $(pysvp64db list | egrep "cntlzdm|cnttzdm|cfuged|pextd|pdepd|brh|brw|brd|setbc|setbcr|setnbc|setnbcr"); do echo "${insn}"; pysvp64db opcodes "${insn}"; pysvp64db operands "${insn}" | sed -e 's|^| |'; echo; done cntlzdm 011111---------------0000111011- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 RB 16, 17, 18, 19, 20 brw 011111---------------0010011011- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 pdepd 011111---------------0010011100- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 RB 16, 17, 18, 19, 20 brd 011111---------------0010111011- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 pextd 011111---------------0010111100- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 RB 16, 17, 18, 19, 20 brh 011111---------------0011011011- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 cfuged 011111---------------0011011100- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 RB 16, 17, 18, 19, 20 setbc 011111---------------0110000000- RT 6, 7, 8, 9, 10 BI 11, 12, 13, 14, 15 setbcr 011111---------------0110100000- RT 6, 7, 8, 9, 10 BI 11, 12, 13, 14, 15 setnbc 011111---------------0111000000- RT 6, 7, 8, 9, 10 BI 11, 12, 13, 14, 15 setnbcr 011111---------------0111100000- RT 6, 7, 8, 9, 10 BI 11, 12, 13, 14, 15 cnttzdm 011111---------------1000111011- RA 11, 12, 13, 14, 15 RS 6, 7, 8, 9, 10 RB 16, 17, 18, 19, 20
libresoc@localhost:~/src/openpower-isa/openpower/isatables$ grep OP_CNT * minor_31.csv:0b0000111010,LOGICAL,OP_CNTZ,RS,NONE,NONE,RA,NONE,CR0,0,0,ZERO,0,NONE,0,0,0,0,0,0,RC,0,0,cntlzd,X,,, RM-1P-2S1D.csv:cntlzdm,NORMAL,,1P,EXTRA3,NO,d:RA,s:RS,s:RB,0,RS,RB,0,RA,0,0,0 minor_31.csv:0b0000111011,LOGICAL,OP_CNTZ,RS,RB,NONE,RA,NONE,NONE,0,0,ZERO,0,NONE,0,0,0,0,0,0,NONE,0,0,cntlzdm,X,,0, sv_decode.vhdl: 2#0000111011# => (NORMAL, P1, EXTRA3, NO, RS, RB, NONE, RA, NONE, NONE, NONE, Idx1, Idx2, NONE, Idx0, NONE, NONE, NONE), -- cntlzdm how is that missing yet functional? it is a good thing, i think. or maybe not, as it means there is a second source where the CSV files are supposed to be canonical.
(In reply to Luke Kenneth Casson Leighton from comment #8) > how is that missing yet functional? what did you think is missing? afaict nothing is missing, all 6 variants of count-zeros are in the CSV: https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/minor_31.csv;h=f6a9c6bbd71466d4d5663bef4c1e9c8c1b697975;hb=5a0517bba06e6b9fe62a435b3d0f067e36c2d120#l30
Done, svp64 branch of binutils-gdb is updated. As usual, I've squashed the results of the autogeneration into the commits which added the autogenerated files, and force-pushed. I also took a moment to rebase against the recent master and fix the conflicts.
(In reply to Jacob Lifshay from comment #9) > what did you think is missing? afaict nothing is missing, all 6 variants of > count-zeros are in the CSV: > https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/ > minor_31.csv;h=f6a9c6bbd71466d4d5663bef4c1e9c8c1b697975; > hb=5a0517bba06e6b9fe62a435b3d0f067e36c2d120#l30 brilliant they are all under OP_CNTLZ. (In reply to Dmitry Selyutin from comment #10) > Done, svp64 branch of binutils-gdb is updated. looks great. a lot of work. https://git.libre-soc.org/?p=binutils-gdb.git;a=commitdiff;h=e292c275038 ahhh hooray :) sffs separated from svp64 as options. awesome
(In reply to Luke Kenneth Casson Leighton from comment #11) > (In reply to Jacob Lifshay from comment #9) > > > what did you think is missing? afaict nothing is missing, all 6 variants of > > count-zeros are in the CSV: > > https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isatables/ > > minor_31.csv;h=f6a9c6bbd71466d4d5663bef4c1e9c8c1b697975; > > hb=5a0517bba06e6b9fe62a435b3d0f067e36c2d120#l30 > > brilliant they are all under OP_CNTLZ. OP_CNTZ, not OP_CNTLZ -- probably why you were confused about missing csv entries