<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Oops. Yes, sorry. That’s just a typo on my part in the commit message. The actual output is just a plain “#180” as you’d expect.<div><br></div><div>-Jim<br><div><br></div><div><br><div><blockquote type="cite"><div>On Jun 11, 2014, at 2:15 PM, James Molloy <<a href="mailto:mankeyrabbit@gmail.com">mankeyrabbit@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div>
<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: <a href="http://llvm.org/viewvc/llvm-project?rev=210701&view=rev">http://llvm.org/viewvc/llvm-project?rev=210701&view=rev</a><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><a href="rdar://17237103">rdar://17237103</a><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></div></div></blockquote></div><br></div></div></body></html>