Re: asm constraints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	unsigned int tbl;
	__asm__("mftbl %0" : "=r" (tbl));

[side note: mftbl is not a PowerPC insn, nor an assembler extended mnemonic. I have no idea why libopcodes accepts it].

I'm wondering why it's wasting a register.

Did you compile with optimization on? If so, what compiler version did you use? I tried with 3.4.1 and it works just fine. If you still have problems, please show the exact code (full routine, compilable as-is).

Am I specifying the constraint incorrectly?

No, it's fine.


Segher


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux