fixed inline asm without operand case
This commit is contained in:
		
							parent
							
								
									85fa15e64c
								
							
						
					
					
						commit
						6e197e3d5d
					
				
					 1 changed files with 8 additions and 3 deletions
				
			
		
							
								
								
									
										7
									
								
								tccasm.c
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								tccasm.c
									
										
									
									
									
								
							| 
						 | 
					@ -710,12 +710,17 @@ static void asm_instr(void)
 | 
				
			||||||
                            operands, nb_operands, nb_outputs, 1, 
 | 
					                            operands, nb_operands, nb_outputs, 1, 
 | 
				
			||||||
                            input_regs_allocated);
 | 
					                            input_regs_allocated);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* substitute the operands in the asm string */
 | 
					    /* substitute the operands in the asm string. No substitution is
 | 
				
			||||||
 | 
					       done if no operands (GCC behaviour) */
 | 
				
			||||||
#ifdef ASM_DEBUG
 | 
					#ifdef ASM_DEBUG
 | 
				
			||||||
    printf("asm: \"%s\"\n", (char *)astr.data);
 | 
					    printf("asm: \"%s\"\n", (char *)astr.data);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					    if (nb_operands > 0) {
 | 
				
			||||||
        subst_asm_operands(operands, nb_operands, nb_outputs, &astr1, &astr);
 | 
					        subst_asm_operands(operands, nb_operands, nb_outputs, &astr1, &astr);
 | 
				
			||||||
        cstr_free(&astr);
 | 
					        cstr_free(&astr);
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        astr1 = astr;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
#ifdef ASM_DEBUG
 | 
					#ifdef ASM_DEBUG
 | 
				
			||||||
    printf("subst_asm: \"%s\"\n", (char *)astr1.data);
 | 
					    printf("subst_asm: \"%s\"\n", (char *)astr1.data);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue