This is the mail archive of the
mailing list for the GCC project.
Matching of non-standard instructions
- From: "Roland Persson" <roland dot persson at blaze dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Mon, 26 Jun 2006 16:16:28 +0200
- Subject: Matching of non-standard instructions
My target has some instructions that do not exactly match any predefined
pattern names. What is the correct way to get gcc to use them in code
For example, I have an add instruction that can add a 32-bit integer (with
or without sign extension) to a 64-bit operand and store the result as 64
C code like:
__int64_t a = 1;
int b = 2;
a += b;
will generate code that sign or zero extends b into a 64 bit operand and
then apply the adddi3 pattern.
I've unsuccessfully tried to figure out how to do this from the gcc
internals documentation and looking at some other ports. Some hints to get
me going in the right direction would be much appreciated.
I've tried adding unnamed patterns for these instructions, using
zero_extend or sign_extend but I guess those will not get used because the
generation has already applied the adddi3 pattern when it generates the RTL
in the first place.