<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Hi Jim,<BR><BR>ldr.w r8, [sp, #0180] @ when printing decimal immediates<BR><BR>Is this a pasto? The leading zero seems very confusing (octal?)<BR><BR>Cheers,<BR><BR>James</DIV></DIV>
<DIV dir=ltr>
<HR>
<SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">From: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:grosbach@apple.com">Jim Grosbach</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Sent: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">‎11/‎06/‎2014 21:39</SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">To: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Subject: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">[llvm] r210701 - ARM: honor hex immediate formatting for ldr/str i12offsets.</SPAN><BR><BR></DIV>Author: grosbach<BR>Date: Wed Jun 11 15:26:45 2014<BR>New Revision: 210701<BR><BR>URL: http://llvm.org/viewvc/llvm-project?rev=210701&view=rev<BR>Log:<BR>ARM: honor hex immediate formatting for ldr/str i12 offsets.<BR><BR>Previously we would always print the offset as decimal, regardless of<BR>the formatting requested. Now we use the formatImm() helper so the value<BR>is printed as the client (LLDB in the motivating example) requested.<BR><BR>Before:<BR>ldr.w r8, [sp, #180] @ always<BR><BR>After:<BR>ldr.w r8, [sp, #0xb4] @ when printing hex immediates<BR>ldr.w r8, [sp, #0180] @ when printing decimal immediates<BR><BR>rdar://17237103<BR><BR>Modified:<BR>    llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp<BR>    llvm/trunk/test/MC/Disassembler/ARM/hex-immediates.txt<BR><BR>Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp<BR>URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=210701&r1=210700&r2=210701&view=diff<BR>==============================================================================<BR>--- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original)<BR>+++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Wed Jun 11 15:26:45 2014<BR>@@ -1092,13 +1092,13 @@ void ARMInstPrinter::printAddrModeImm12O<BR>   if (isSub) {<BR>     O << ", "<BR>       << markup("<imm:")<BR>-      << "#-" << -OffImm<BR>+      << "#-" << formatImm(-OffImm)<BR>       << markup(">");<BR>   }<BR>   else if (AlwaysPrintImm0 || OffImm > 0) {<BR>     O << ", "<BR>       << markup("<imm:")<BR>-      << "#" << OffImm<BR>+      << "#" << formatImm(OffImm)<BR>       << markup(">");<BR>   }<BR>   O << "]" << markup(">");<BR><BR>Modified: llvm/trunk/test/MC/Disassembler/ARM/hex-immediates.txt<BR>URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/hex-immediates.txt?rev=210701&r1=210700&r2=210701&view=diff<BR>==============================================================================<BR>--- llvm/trunk/test/MC/Disassembler/ARM/hex-immediates.txt (original)<BR>+++ llvm/trunk/test/MC/Disassembler/ARM/hex-immediates.txt Wed Jun 11 15:26:45 2014<BR>@@ -3,3 +3,9 @@<BR>0x08 0x4c<BR># CHECK: sub sp, #0x84<BR>0xa1 0xb0<BR>+# CHECK: ldr  r0, [sp, #0xb4]<BR>+0x2d 0x98<BR>+# CHECK: str.w  r8, [sp, #0xb4]<BR>+0xcd 0xf8 0xb4 0x80<BR>+# CHECK: ldr.w  r8, [sp, #0xb4]<BR>+0xdd 0xf8 0xb4 0x80<BR><BR><BR>_______________________________________________<BR>llvm-commits mailing list<BR>llvm-commits@cs.uiuc.edu<BR>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<BR></BODY></HTML>