[Libre-soc-bugs] [Bug 849] binutils: parse macros in SVP64 and refactor code
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sun Jul 24 22:06:54 BST 2022
https://bugs.libre-soc.org/show_bug.cgi?id=849
--- Comment #33 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #32)
> On svp64-ng branch, the following works:
> .set coco, eq
> .set jum, ^r3
> .set bo, 1<<r3
> sv.extsw./ff=coco *85, *r84
> sv.extsw./pr=jum/m=bo *5, *r72
hoorah, much shorter.
ah. sorry it's taken me a while to spot this, ff and pr must only take
CR-fields (inv + eq/lt/gt/so). there's no bit here to specify to use
integer regs r3/r10/r31:
https://libre-soc.org/openpower/sv/normal/#index2h1
0-1 2 3 4 description
01 inv CR-bit Rc=1: ffirst CR sel
11 inv CR-bit Rc=1: pred-result CR sel
https://git.libre-soc.org/?p=binutils-gdb.git;a=blob;f=gas/config/tc-ppc-svp64.c;h=7f27093cde7fff236e4d254b54072e8430a1aab5;hb=0abcbc8220d812de3261fc44c5c65989882c0cec#l304
304 svp64_decode_predicate (char *str, bool *cr, unsigned int *mask,
bool crmode)
305 {
...
372 predicate = (enum svp64_predicate)exp.X_add_number;
373 *cr = (table[predicate].cr ? true : false);
if (crmode && !(*cr)) { // pr= and ff= only allow CRs
return NULL;
}
then ff and pr decode set true (others set false)
640 svp64_decode_ff (char *str, struct svp64_ctx *svp64)
641 {
...
650 iter = svp64_decode_predicate (str, &cr, &mask,
true);
662 svp64_decode_pr (char *str, struct svp64_ctx *svp64)
663 {
...
672 iter = svp64_decode_predicate (str, &cr, &mask,
true);
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list