First Last Prev Next    No search results available
Details
: Stacker does not handle targets with 64-bit pointers
Bug#: 178
: Projects
: Stacker
Status: RESOLVED
Resolution: FIXED
: All
: All
: unspecified
: P4
: normal
: ---

:
: missing-feature, portability
:
:
  Show dependency tree - Show dependency graph
People
Reporter: John T. Criswell <criswell@uiuc.edu>
Assigned To: Unassigned LLVM Bugs <unassignedbugs@nondot.org>
:

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2003-12-12 14:14
The following error occurs when compiling stacker on SparcV9:

/home/vadve/criswell/llvm/projects/Stacker/lib/runtime/stacker_rt.c: In function
`main':
/home/vadve/criswell/llvm/projects/Stacker/lib/runtime/stacker_rt.c:58: warning:
cast from pointer to integer of different size

Examination of the source code shows that a stack is an array of integers (32
bit).  The code attempts to place a pointer (64 bit) to the command line
arguments on this stack.

The code needs to be revised to handle 32 and 64 bit values properly.
------- Comment #1 From Reid Spencer 2003-12-12 14:46:45 -------
This is a known, documented, limitation of the implementation. Avoiding some of
these kinds of issues is one of the reasons I was able to get Stacker done
quickly. To fix the problem correctly, I need to use a union of a long and a
pointer as the element type of the global stack.  To use a union, I have to add
union support the the LLVM Assembler, something which is beyond the scope of
Stacker. 

I'll consider fixing it, but this doesn't have a high priority for me so I'm
going to downgrade the priority of this bug. If someone wants to implement the
union feature in LLVM, I'd gladly do what's necessary in Stacker to use it. If
there's a way to do unions in some implicit way in LLVM, please let me know. I
didn't find anything in the documentation.

Reid.
------- Comment #2 From Reid Spencer 2003-12-19 03:36:54 -------
Accepting this. One way around the union problem is to just use 64-bit wide
entries in the stack. This will make things slower on 32-bit machines, provide
for larger integer values, and allow the pointer type on Solaris to be
incorporated. However, it will break again when we get a 128-bit computer :)

Reid.
------- Comment #3 From Chris Lattner 2004-02-26 15:26:50 -------
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
------- Comment #4 From Reid Spencer 2004-05-09 18:22:41 -------
I have checked in changes to resolve this bug by making the Stacker stack
64-bits instead of 32-bits. This works fine on Linux/i86 but I can't be certain
it fixes the problem on 64-bit targets (e.g. Solaris) because I don't have a
64-bit machine available.

I will assume this bug is fixed for Solaris. If someone wants to run the Stacker
tests on Solaris and confirm, that would be appreciated.

First Last Prev Next    No search results available