Issue Details (XML | Word | Printable)

Key: PCC-363
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

ulltofp() refers to constant in wrong manner with -fPIC

Created: 25/Jun/11 10:07 PM   Updated: 01/Jul/11 05:25 PM
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386

 Description  « Hide
The ulltofp() function in local2.c emits code to convert from an unsigned long long value,
but when -fPIC is passed it refers to a constant in the wrong way.. the following snippet
shows the problem

float /* or double */
foo(unsigned long long a)
    return a;

when compiled with -fPIC produces

.L15: .long 0,0x80000000,0x403f
        pushl %edx
        pushl %eax
        fildq (%esp)
        addl $8,%esp
        cmpl $0,%edx
        jge .L16
        fldt .L15
        faddp %st,%st(1)

and the fldt instruction should be using some kind of @GOTOFF notation?

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson made changes - 01/Jul/11 05:25 PM
Field Original Value New Value
Assignee Anders Magnusson [ ragge ]
Anders Magnusson made changes - 01/Jul/11 05:25 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]