Mercurial > projects > ldc
comparison gen/asmstmt.cpp @ 978:6a32d2e18175
Fix a latent bug in the asm code.
I think that technically, using "*m0" instead of "*0" allows LLVM to pick
between using the same memory as output 0 and using a new memory location.
(So far I haven't been able to construct a testcase that actually breaks
because of this, though)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 18 Feb 2009 03:38:12 +0100 |
parents | 985104c0f1db |
children | 523bf4f166bc |
comparison
equal
deleted
inserted
replaced
977:3efbe9b0dd36 | 978:6a32d2e18175 |
---|---|
393 // Change update operand to pure output operand. | 393 // Change update operand to pure output operand. |
394 *i = mw_cns; | 394 *i = mw_cns; |
395 | 395 |
396 // Add input operand with same value, with original as "matching output". | 396 // Add input operand with same value, with original as "matching output". |
397 std::ostringstream ss; | 397 std::ostringstream ss; |
398 ss << m_cns << (n + asmblock->outputcount); | 398 ss << '*' << (n + asmblock->outputcount); |
399 input_constraints.push_front(ss.str()); | 399 input_constraints.push_front(ss.str()); |
400 input_values.push_front(output_values[n]); | 400 input_values.push_front(output_values[n]); |
401 } | 401 } |
402 llvmOutConstraints += *i; | 402 llvmOutConstraints += *i; |
403 llvmOutConstraints += ","; | 403 llvmOutConstraints += ","; |