This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support for MIPS R5900 (Sony Playstation 2)

Hello Nick,

> > It seems that the patch was not yet processed. So I created a new one
> with some fixes (including the old patch).
> > I added tests for all new instructions
> (gas/testsuite/gas/mips/r5900-full.d and gas/testsuite/gas/mips/r5900-full.s). With the tests I detected
> that I made some mistakes when re-creating the patch from scratch. I confused
> the parameters for psllvw, psravw and psrlvw. This is fixed in the new
> patch.
> Thank you for extending your patch, and my apologies for taking so long 
> to review it.  The patch itself is fine, I am ready to approve it.

Thanks for reviewing my patch.

> There are however two small problems:
>    1.  We need ChangeLog entries for changes made by the patch.

I created the changelog entries, I hope it is in an acceptable format:

Changelog for bfd:
2013-01-03  Juergen Urban <>

	* archures.c: Add support for MIPS r5900
	* bfd-in2.h: Add support for MIPS r5900
	* config.bfd: Add support for Sony Playstation 2
	* cpu-mips.c: Add support for MIPS r5900
	* elfxx-mips.c: Add support for MIPS r5900 (extension of r4000)

Changelog for gas:
2013-01-03  Juergen Urban <>

	* config/tc-mips.c: Add support for MIPS r5900
	Add M_LQ_AB and M_SQ_AB to support large values for instructions lq and sq.
	* config/tc-mips.c (can_swap_branch_p, get_append_method): Detect some conditional short loops to fix a bug on the r5900 by NOP in the branch delay slot.
	* config/tc-mips.c (M_MUL): Support 3 operands in multu on r5900.
	* config/tc-mips.c (M_TRUNCWS): Support trunc.w.s on r5900 in MIPS ISA I.
	* config/tc-mips.c (s_mipsset): Force 32 bit floating point on r5900.
	* Detect CPU type when target string contains r5900 (e.g. mips64r5900el-linux-gnu).

2013-01-03  ragnarok2040

	* config/tc-mips.c (mips_ip): Check parameter range of instructions mfps and mtps on r5900.

Changelog for include:
2013-01-03  Juergen Urban <>

	* elf/mips.h: Add MIPS machine variant number for r5900 which is compatible with old Playstation 2 software.
	* opcode/mips.h: Add support for r5900 instructions including lq and sq.

Changelog for ld:
2013-01-03  Juergen Urban <>

	* configure.tgt: Support ELF files for Sony Playstation 2 (for ps2dev and ps2sdk).
	* emulparams/ Create linker script for Sony Playstation 2 ELF files using MIPS ABI n32.
	* emulparams/ Create linker script for Sony Playstation 2 ELF files using MIPS ABI o32.
	* Add linker scripts for Sony Playstation 2 ELF files.

Changelog for opcodes:
2013-01-03  ragnarok2040

	* opcodes/mips-dis.c: Add names for CP0 registers of r5900.
	* opcodes/mips-opc.c: Add M_SQ_AB and M_LQ_AB to support larger range for instructions sq and lq.

Changelog for opcodes:
2013-01-03  Juergen Urban <>

	* opcodes/mips-opc.c: Add support for MIPS r5900 CPU.
	Add support for 128 bit MMI (Multimedia Instructions).
	Add support for EE instructions (Emotion Engine).
	Disable unsupported floating point instructions (64 bit and undefined compare operations).
	Enable instructions of MIPS ISA IV which are supported by r5900.
	Disable 64 bit co processor instructions.
	Disable 64 bit multiplication and division instructions.
	Disable instructions for co-processor 2 and 3, because these are not supported (preparation for later VU0 support (Vector Unit)).
	Disable cvt.w.s because this behaves like trunc.w.s and the correct execution can't be ensured on r5900.
	Add trunc.w.s using the opcode encoding of cvt.w.s on r5900. This will confuse less developers and compilers.

>    2.  The patch to the top level config.sub file will have to be 
> submitted separately, and not to this list but to the config project 
> list instead (

I submitted the patch on the config project.

Best regards

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]