[llvm-commits] [llvm-gcc-4.2] r132198 - /llvm-gcc-4.2/trunk/gcc/config/arm/arm.h

Bob Wilson bob.wilson at apple.com
Fri May 27 11:24:06 PDT 2011


Author: bwilson
Date: Fri May 27 13:24:06 2011
New Revision: 132198

URL: http://llvm.org/viewvc/llvm-project?rev=132198&view=rev
Log:
Modify svn r131599 to canonicalize non-VFP register names to match the llvm
backend names.  Radar 9515107.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/arm/arm.h

Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.h?rev=132198&r1=132197&r2=132198&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.h Fri May 27 13:24:06 2011
@@ -3599,14 +3599,16 @@
 
 /* LLVM_GET_REG_NAME - The registers known to llvm as "r10", "r11", and "r12"
    may have different names in GCC.  Register "r12" is called "ip", and on
-   non-Darwin OSs, "r10" is "sl" and "r11" is "fp".  Translate those names,
-   and use incoming register name if it exists otherwise since reg_names doesn't
-   distinguish between the q and d registers.  */
+   non-Darwin OSs, "r10" is "sl" and "r11" is "fp".  Translate those names.
+   For VFP registers, GCC doesn't distinguish between the q and d registers
+   so use the incoming register name if it exists.  Otherwise, use the default
+   register names to match the backend.  */
 #define LLVM_GET_REG_NAME(REG_NAME, REG_NUM) \
   ((REG_NUM) == 10 ? "r10" \
    : (REG_NUM) == 11 ? "r11" \
    : (REG_NUM) == 12 ? "r12" \
-   : (REG_NAME ? REG_NAME : reg_names[REG_NUM]))
+   : (REG_NUM) >= FIRST_VFP_REGNUM && REG_NAME != 0 ? REG_NAME \
+   : reg_names[REG_NUM])
 
 #endif /* ENABLE_LLVM */
 /* LLVM LOCAL end */





More information about the llvm-commits mailing list