[Lldb-commits] [PATCH] EmulationStateARM: Don't have >= comparisons against dwarf_r0

Todd Fiala tfiala at google.com
Wed Jul 30 13:39:35 PDT 2014

I dunno - this is encoding some logic that makes sure the reg number is
between r0 and cpsr.  The fact that r0 happens to be zero is convenient in
this case, but taking that out is taking out some documentation of what the
code is really doing.

In general I'm not a fan of removing semantic information that is
meaningful to humans even if the compiler can optimize it to a simpler
expression.  If this code were ever copied for another architecture where
the equivalent of r0 was a different number, or if the reg_num was turned
to a typedef and that changed to, say, an int, we've not only lost semantic
info but also real logic.

That's my 2 cents.



More information about the lldb-commits mailing list