Skip to content
Snippets Groups Projects
Commit 5ace1776 authored by Dimitar Dimitrov's avatar Dimitar Dimitrov
Browse files

pru: Add builtins for HALT and LMBD

Add builtins for HALT and LMBD, per Texas Instruments document
SPRUHV7C.  Use the new LMBD pattern to define an expand for clz.

Binutils [1] and sim [2] support for LMBD instruction are merged now.

[1] https://sourceware.org/pipermail/binutils/2020-October/113901.html
[2] https://sourceware.org/pipermail/gdb-patches/2020-November/173141.html

gcc/ChangeLog:

	* config/pru/alu-zext.md: Add lmbd patterns for zero_extend
	variants.
	* config/pru/pru.c (enum pru_builtin): Add HALT and LMBD.
	(pru_init_builtins): Ditto.
	(pru_builtin_decl): Ditto.
	(pru_expand_builtin): Ditto.
	* config/pru/pru.h (CLZ_DEFINED_VALUE_AT_ZERO): Define PRU
	value for CLZ with zero value parameter.
	* config/pru/pru.md: Add halt, lmbd and clz patterns.
	* doc/extend.texi: Document PRU builtins.

gcc/testsuite/ChangeLog:

	* gcc.target/pru/halt.c: New test.
	* gcc.target/pru/lmbd.c: New test.
parent 0b0061f4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment