[inline-asm]No error for conflict between inputs\outputs and clobber list
Updated test according to commit 290539:
According to extended asm syntax, a case where the clobber list includes a variable from the inputs or outputs should be an error - conflict.
for example:
const long double a = 0.0;
int main()
{
char b;
double t1 = a;
__asm__ ("fucompp": "=a" (b) : "u" (t1), "t" (t1) : "cc", "st", "st(1)");
return 0;
}
This should conflict with the output - t1 which is st, and st which is st aswell.
The patch fixes it.
Commit on behald of Ziv Izhar.
Differential Revision: https://reviews.llvm.org/D15075
llvm-svn: 290540
			
			
This commit is contained in:
		
							parent
							
								
									c42fd03bf8
								
							
						
					
					
						commit
						168b954611
					
				| 
						 | 
					@ -62,7 +62,7 @@ template<> Type asm_read<Type>(Type *ptr) {        \
 | 
				
			||||||
    __asm__("rep " Movs " \n\t"                                                \
 | 
					    __asm__("rep " Movs " \n\t"                                                \
 | 
				
			||||||
            :                                                                  \
 | 
					            :                                                                  \
 | 
				
			||||||
            : "D"(dst), "S"(src), "c"(size)                                    \
 | 
					            : "D"(dst), "S"(src), "c"(size)                                    \
 | 
				
			||||||
            : "rsi", "rdi", "rcx", "memory");                                  \
 | 
					            : "memory");                                  \
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DECLARE_ASM_WRITE(U8, "8", "movq", "r");
 | 
					DECLARE_ASM_WRITE(U8, "8", "movq", "r");
 | 
				
			||||||
| 
						 | 
					@ -104,7 +104,7 @@ template<> Type asm_read<Type>(Type *ptr) {        \
 | 
				
			||||||
    __asm__("rep " Movs " \n\t"                                                \
 | 
					    __asm__("rep " Movs " \n\t"                                                \
 | 
				
			||||||
            :                                                                  \
 | 
					            :                                                                  \
 | 
				
			||||||
            : "D"(dst), "S"(src), "c"(size)                                    \
 | 
					            : "D"(dst), "S"(src), "c"(size)                                    \
 | 
				
			||||||
            : "esi", "edi", "ecx", "memory");                                  \
 | 
					            : "memory");                                  \
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} // End of anonymous namespace
 | 
					} // End of anonymous namespace
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue