Re: [RFC] [PATCH] 32-bit pointers in x86-64



"Andrew Pinski" <pinskia@xxxxxxxxx> 25.11.07 19:45 >>>
On 11/25/07, Luca <luca.b633@xxxxxxxxx> wrote:
7.1. Add __attribute__((pointer_size(XXX))) and #pragma pointer_size
to allow 64-bit pointers in 32-bit mode and viceversa

This is already there, try using __attribute__((mode(DI) )).

Hmm, unless this is a new feature in 4.3, I can't seem to get this to work on
either i386 (using mode DI) or x86-64 (using mode SI). Could you clarify? If
this worked consistently on at least all 64-bit architectures, I would have a
use for it in the kernel (cutting down the kernel size by perhaps several
pages). Btw., I continue to think that the error message 'initializer element
is not computable at load time' on 64-bit code like this

extern char array[];
unsigned int p = (unsigned long)array;

or 32-bit code like this

extern char array[];
unsigned long long p = (unsigned long)array;

is incorrect - the compiler generally has no knowledge what 'array' is (it may
know whether the architecture is generally capable of expressing the
necessary relocation, but if 'array' is really a placeholder for an assembly
level constant, possibly even defined through __asm__() in the same
translation unit, this diagnostic should at best be a warning). I'm pretty
sure I have an open bug for this, but the sad thing is that bugs like this
never appear to really get looked at.

Thanks, Jan

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



Relevant Pages

  • Re: What about this?
    ... echo validate_form; ... // First create an array to contains error message ... // Then create an array to contains OK Data from formfields. ...
    (alt.php)
  • Re: 3D Matrix Manipulation
    ... Any variable with more than 2 dimensions is an array, and certain operations that are only defined for matrices will not work on arrays. ... matrix multiplication will not work because one of the pieces of data being multiplied is not a matrix and elementwise multiplication will not work because the two pieces of data being multiplied are not the same size and neither is scalar. ... > Another problem is that I am able to process the first line in the command> window yet as soon as I run the script, I get an error message depending> on the syntax. ...
    (comp.soft-sys.matlab)
  • Re: What about this?
    ... echo validate_form; ... // First create an array to contains error message ... // Then create an array to contains OK Data from formfields. ...
    (alt.php)
  • Re: memory problem, I guess
    ... If I use part of the data I'm getting the right transform. ... I searched the web and found that the error message is ... Below is the error message I'm getting when I increas my array size: ... trying to use (it would have been good to specify that)? ...
    (comp.lang.fortran)
  • Re: UDT Array Parameter
    ... It looks like the array passing was already working - it appears that my ... same error message; apparently, the late-bound function is the IsArray ... Private Sub Form_Load ... Dim testAs myTestType, b As Boolean ...
    (microsoft.public.vb.general.discussion)