Hi, 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 generation?
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 bits. 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. Roland