Skip to content
Snippets Groups Projects
Commit 31d18ff4 authored by David Faust's avatar David Faust
Browse files

bpf: correct pseudo-C template for add3 and sub3

The pseudo-C output templates for these instructions were incorrectly
using operand 1 rather than operand 2 on the RHS, which led to some
very incorrect assembly generation with -masm=pseudoc.

gcc/

	* config/bpf/bpf.md (add<AM:mode>3): Use %w2 instead of %w1
	in pseudo-C dialect output template.
	(sub<AM:mode>3): Likewise.

gcc/testsuite/

	* gcc.target/bpf/alu-2.c: New test.
	* gcc.target/bpf/alu-pseudoc-2.c: Likewise.
parent d023775c
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