[llvm-commits] [llvm-gcc-4.2] r104804 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Bob Wilson
bob.wilson at apple.com
Wed May 26 22:29:41 PDT 2010
Author: bwilson
Date: Thu May 27 00:29:41 2010
New Revision: 104804
URL: http://llvm.org/viewvc/llvm-project?rev=104804&view=rev
Log:
Avoid introducing an extra '=' in the constraint for an output register.
Fix a comment typo, too.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=104804&r1=104803&r2=104804&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu May 27 00:29:41 2010
@@ -4730,12 +4730,11 @@
if (RegNum >= 0) {
RegName = LLVM_GET_REG_NAME(RegName, RegNum);
unsigned RegNameLen = strlen(RegName);
- char *NewConstraint = (char*)alloca(RegNameLen+4);
- NewConstraint[0] = '=';
- NewConstraint[1] = '{';
- memcpy(NewConstraint+2, RegName, RegNameLen);
- NewConstraint[RegNameLen+2] = '}';
- NewConstraint[RegNameLen+3] = 0;
+ char *NewConstraint = (char*)alloca(RegNameLen+3);
+ NewConstraint[0] = '{';
+ memcpy(NewConstraint+1, RegName, RegNameLen);
+ NewConstraint[RegNameLen+1] = '}';
+ NewConstraint[RegNameLen+2] = 0;
SimplifiedConstraint = NewConstraint;
// This output will now be implicit; set the sideffect flag on the asm.
HasSideEffects = true;
@@ -4889,7 +4888,7 @@
if (isIndirect)
ConstraintStr += '*';
- // If this output register is pinned to a machine register, use that machine
+ // If this input register is pinned to a machine register, use that machine
// register instead of the specified constraint.
if (TREE_CODE(Val) == VAR_DECL && DECL_HARD_REGISTER(Val)) {
const char *RegName = extractRegisterName(Val);
More information about the llvm-commits
mailing list