This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Code that used to compile
- To: Laurent dot Kersten at alcatel dot be
- Subject: Re: Code that used to compile
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 14 Nov 2000 10:04:28 -0800
- CC: gcc-bugs at gcc dot gnu dot org
- References: <C1256997.003CBA9E.00@bemail01.net.alcatel.be>
Laurent.Kersten@alcatel.be writes:
> rdtsc.c:13: Invalid `asm' statement:
> rdtsc.c:13: fixed or forbidden register 0 (ax) was spilled for class AREG.
> __asm__ __volatile__ ("rdtsc"
> :"=a" (tsc.time_lh[0]), "=d" (tsc.time_lh[1])
> :
> :"ax", "dx");
The compiler is complaining that it can't find a register of class AREG,
because register 0 is fixed or forbidden.
You have asked for a register of this class by saying '=a', and you have
asked for it to be forbidden by saying that the asm clobbers "ax". Since
there's only one AREG register, you can't do both of these at the same time.
--
- Geoffrey Keating <geoffk@geoffk.org>