Issue Details (XML | Word | Printable)

Key: PCC-374
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.

movsbl error with -xtemps

Created: 04/Aug/11 09:35 PM   Updated: 08/Aug/11 09:28 PM
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386

 Description  « Hide
the following code fragment

int foo(unsigned int a)
        return ((char *)&a)[0];

when compiled with -xtemps results in errors from the gnu i386 assembler

/tmp/ctm.27893a: Assembler messages:
/tmp/ctm.27893a:11: Error: suffix or operands invalid for `movsbl'

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 04/Aug/11 09:46 PM
a gets put into a register even if its address is taken, which is not legal.

Anders Magnusson added a comment - 08/Aug/11 09:28 PM
Fixed now by not discarding UMUL ADDROF when applied to a TEMP node, it will be converted to a memory reference in pass2.