lkml.org 
[lkml]   [2011]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: X32 psABI status update
From
On Mon, Mar 21, 2011 at 1:20 AM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Sun, 20 Mar 2011, H.J. Lu wrote:
>
>> I don't think it will help x32 and I think it will make it harder to add
>> x32 support. I still want to see a real usage before I add it.
>
> % cat real-world.c
> /* intptr_t; what's that? */
> union space_saving_htab_element {
>  void *generic_pointer;
>  /* Usually we need a long for a pointer, but I just figured out
>     that on x32 an int is enough and smaller.  My program
>     now needs half as much memory, supi!  */
> #ifdef __x32__
>  unsigned int as_number;
> #else
>  unsigned long as_number;
> #endif
> };

That is the wrong way to support x32. You should remove "#ifdef __x32__",
which only shows __x32__ shouldn't be used/needed.

>
> Ciao,
> Michael.
> PS: Of course you and I wouldn't write such code, but Mikes point was that
> there might be some that do.  I could probably construct an example where
> it would matter for real involving inline asm that for some reason has to
> slightly differ depending on x32-ness.
>

I am still waiting for a real example.

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

\
 
 \ /
  Last update: 2011-03-21 11:55    [W:0.037 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site