[Bug target/16194] [3.4/3.5 Regression] In case of H8/300 target, internal compiler error (ICE): asm clobber conflict with output operand

prafullat at kpitcummins dot com gcc-bugzilla@gcc.gnu.org
Thu Jul 1 05:25:00 GMT 2004


------- Additional Comments From prafullat at kpitcummins dot com  2004-07-01 05:25 -------
Following code was causing ICE for H8 target. Same is confirmed for SH target.
Logically, it seems that compiler will give ICE for any asm instruction with 
following format and if you are pointing to memory addressed by the input or 
output operands that conflict with clobber list. 
General Instruction format:
asm ("INSN" : O/P Operand : I/P operand : Clobber List);

for H8 target:
///////////////////////////////////////////////////////////////////////////
void bug(void) 
{ 
	register char* _dst __asm ("r6"); 
	__asm__ ("eepmov.b":"=g"(*_dst)::"r4","er5","er6");  	//for H8 target
} 
///////////////////////////////////////////////////////////////////////////

For SH target
///////////////////////////////////////////////////////////////////////////
void bug(void)
{
	register char* _dst __asm ("r1"); 
	register char* _dst1 __asm ("r0"); 
	__asm__ ("mov.b %0,%1":"=g"(*_dst):"g"(*_dst1):"r0","r1"); 
}
///////////////////////////////////////////////////////////////////////////



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16194



More information about the Gcc-bugs mailing list