Issue Details (XML | Word | Printable)

Key: PCC-197
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: andre f.
Votes: 0
Watchers: 0
Operations

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

amd64: unsupported xasm constraint 'A'

Created: 02/Dec/10 11:44 AM   Updated: 04/Dec/10 09:43 PM
Component/s: amd64 target
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File amd64errata.c (0.5 kB)

Environment: pcc 101201 on OpenBSD 4.7 amd64 compiling OpenBSD 4.7 kernel source (GENERIC kernel config)


 Description  « Hide
pcc 101201 on OpenBSD 4.7 amd64 compiling OpenBSD 4.7 kernel source (GENERIC kernel config)
fails in arch/amd64/amd64/amd64errata.c with
amd64errata.c, line 240: unsupported xasm constraint 'A'
amd64errata.c, line 240: bad xasm node type 7
cannot recover from earlier errors: goodbye!

the reduced code fragment triggering the error:

typedef unsigned int u_int;
typedef unsigned long long u_int64_t;

#define OPTERON_MSR_PASSCODE 0x9c5a203a
 
static __inline u_int64_t
rdmsr_locked(u_int msr, u_int code)
{
u_int64_t rv;
__asm volatile("rdmsr"
: "=A" (rv)
: "c" (msr), "D" (code));
return (rv);
}

void
amd64_errata_testmsr()
{
u_int e_data1;
u_int64_t val = rdmsr_locked(e_data1, OPTERON_MSR_PASSCODE);
}


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 04/Dec/10 09:43 PM
Compiles now, but this use of A constraint seems wrong due to gcc docs.