lkml.org 
[lkml]   [1998]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Problem with 1G RAM
On Sat, Dec 05, 1998 at 09:48:44PM +0100, MOLNAR Ingo wrote:
> on x86, we can do instructions like:
>
> movl 0xc0000028(%eax), %ebx
>
> the compiler expands it's patters wildly differently when it's a constant.

Um, have you tried this Ingo? Given

extern char __foo;
#define foo ((int)&__foo)
int bar(int *x)
{
return x[foo+45];
}

or suchlike you should see __foo combined with other operations.

movl $__foo+45,%eax
movl (%edx,%eax,4),%eax

in this case due to the shift.

My guess is that you can do fairly well with the immediates.
Certainly better than having them be completely variable.


r~

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:7.277 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site