|
From: | Eric Weddington |
Subject: | Re: [avr-gcc-list] multiply by constant always expands to int |
Date: | Tue, 06 Dec 2005 10:35:17 -0700 |
User-agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Paulo Marques wrote:
I had a somewhat similar problem with gcc 4.0.2. The following code:unsigned char a, b; unsigned short w; w = a * b;correctly translates into a single "mul" instruction under gcc 3.4.3 (modulo the register moves) but promotes "a" and "b" to 2-byte integers under gcc 4.0.2, generating a bunch of mul's and add's.
Could you provide a complete testcase, and not just a snippet? I'm having a hard time reproducing what you are describing with 4.0.2.
Is there any documentation (good or bad) about the gcc internals that I could use as a starting point? Or is this a "use the source, Luke" kind of scenario? :)
That's a question for the gcc mailing list. The best thing to do is to start looking around on the GCC website and looking at all of the available documentation. Yes, they have an internals document. However, from what I've heard from others, it's not exactly easy to get through; it takes a lot of perserverance to learn GCC internals.
-- Eric Weddington
[Prev in Thread] | Current Thread | [Next in Thread] |