On Mon, Apr 09, 2007 at 09:47:07AM -0700, Andrew Pinski wrote:
On 4/9/07, J.C. Pizarro [EMAIL PROTECTED] wrote:
#include stddef.h
void *__allocate_array_OptionA(size_t num, size_t size) { // 1st best
unsigned long long tmp = (unsigned long long)size * num;
if (tmp =
2007/4/9, Joe Buck [EMAIL PROTECTED]:
On Mon, Apr 09, 2007 at 09:47:07AM -0700, Andrew Pinski wrote:
On 4/9/07, J.C. Pizarro [EMAIL PROTECTED] wrote:
#include stddef.h
void *__allocate_array_OptionA(size_t num, size_t size) { // 1st best
unsigned long long tmp = (unsigned long long)size
4. Conditional moves (cmov).
J.C. Pizarro [EMAIL PROTECTED] writes:
To optimize even more the x86, it still has to use:
1. Use imul instead of mul because it's little bit faster in cycles.
2. Use jns/js (sign's conditional jump) instead of jnc/jc (carry's
conditional jump).
3. To modify the C-preprocessor and/or C/C++
2007/4/9, Andrew Pinski [EMAIL PROTECTED]:
On 4/9/07, J.C. Pizarro [EMAIL PROTECTED] wrote:
3. To modify the C-preprocessor and/or C/C++ compiler for:
#if argument X is a constant then
use this code specific of constant X
#else if argument Y is not a constant then
On Apr 9, 2007, at 12:14 PM, J.C. Pizarro wrote:
How many code's species are they?
One for every problem...
7. Code for IPA??? - i don't know this weird language. Is it with
attributes?.
8. Code for GIMPLE??? - i don't know this weird language.
9. Code for RTL??? - i don't know this weird
On 4/9/07, J.C. Pizarro [EMAIL PROTECTED] wrote:
Of course, i'm a novice because i like and i don't like the
GCC development's model.
Of course the user manual explains all what I have mentioned in my
previous email so it sounds like you like 95% of the other people who
don't read the manual
#include stddef.h // by J.C. Pîzarro
...
// See http://www.cs.sjsu.edu/~kirchher/CS047/multDiv.html
// One-operand imul: Unsigned mul:
// warning: 32 bit, i686, possible risk of -x * -y = valid x * y, ...
// warning: it's made quick dirty, possible to give clobbered situations.
//
#include stddef.h // by J.C. Pîzarro
...
// This function doesn't touch the ECX register that is touched by OptionC.
__volatile__ static const int minus_one = -1;
void *__allocate_array_OptionD(size_t num, size_t size) {
register unsigned int result;
__asm__ __volatile__
(