This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Support VU0 on MIPS R5900
- From: "JÃrgen Urban" <JuergenUrban at gmx dot de>
- To: "Richard Sandiford" <rdsandiford at googlemail dot com>
- Cc: binutils at sourceware dot org
- Date: Sun, 28 Jul 2013 23:15:37 +0200 (CEST)
- Subject: Re: [PATCH] Support VU0 on MIPS R5900
- References: <20130108234130 dot 27410 at gmx dot net>, <87a9rrso6l dot fsf at talisman dot default>
- Sensitivity: Normal
Hello Richard,
> The patch mostly looks good,
> but I've got a few questions:
ragnarok2040 is busy and wasn't able to finish the work. So I took over the work. The binutils changed in the meantime. So the old patch doesn't apply and your questions are no longer applicable (the patch is completely changed). I couldn't find a way to work the old stuff in, because the new binutils are very different. So I decided to add it without special support for suffixes. All suffixes are listed instead in the mips opcode table, so the suffixes will work without special suffix support. I think this was the intented way that binutils was designed for. The result is that the patch adds 1527 instructions. I assuming that the search is optimized and I can't make it better implementing support for suffixes. I did the same for register suffixes, so all combinations are part of the internal symbol table for registers, i.e. 1043 registers.
I added all tests which are needed to test it and to show that is reliable and everything is correct. This increased the patch to 1 MByte. I know this is big, but I think this is needed for testing it correctly. The assembler needs only 16ms for building the test from the source file on my system.
Because of the size of the patch I only post a link to it:
http://kernelloader.cvs.sourceforge.net/viewvc/kernelloader/linux/simple-toolchain/binutils-cvs-20130721-mipsel-ps2.patch?revision=1.2&view=markup
The handling of the suffix is described in line 270 of the patch (function match_suffix_operand()).
The patch adds the VU0 Macromode instructions and registers. It also changes the existing coprocessor instructions to support the register names.
The VU0 supports vcallmsr only with register $vi27. This is currently not checked by the assembler, so other registers can be used. A fix for this will be later submitted when I found out how to fix this. Currently the assembler rejects the valid instruction:
vmulax.xyzw $ACC, $vf4, $vf8
because the register is not $vf8x. I will submit a patch for this later, because old code uses this syntax.
Best regards
JÃrgen