[llvm-commits] [llvm] r140861 - /llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Eli Friedman
eli.friedman at gmail.com
Fri Sep 30 11:49:54 PDT 2011
On Fri, Sep 30, 2011 at 10:23 AM, Jim Grosbach <grosbach at apple.com> wrote:
> Author: grosbach
> Date: Fri Sep 30 12:23:05 2011
> New Revision: 140861
>
> URL: http://llvm.org/viewvc/llvm-project?rev=140861&view=rev
> Log:
> ARM Fixup valus for movt/movw are for the whole value.
>
> Remove an assert that was expecting only the relevant 16bit portion for
> the fixup being handled. Also kill some dead code in the T2 portion.
>
> rdar://9653509
>
> Modified:
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
>
> Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=140861&r1=140860&r2=140861&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Fri Sep 30 12:23:05 2011
> @@ -183,8 +183,6 @@
> case ARM::fixup_arm_movw_lo16_pcrel: {
> unsigned Hi4 = (Value & 0xF000) >> 12;
> unsigned Lo12 = Value & 0x0FFF;
> - assert ((((int64_t)Value) >= -0x8000) && (((int64_t)Value) <= 0x7fff) &&
> - "Out of range pc-relative fixup value!");
> // inst{19-16} = Hi4;
> // inst{11-0} = Lo12;
> Value = (Hi4 << 16) | (Lo12);
> @@ -205,11 +203,6 @@
> // inst{26} = i;
> // inst{14-12} = Mid3;
> // inst{7-0} = Lo8;
> - // The value comes in as the whole thing, not just the portion required
> - // for this fixup, so we need to mask off the bits not handled by this
> - // portion (lo vs. hi).
> - Value &= 0xffff;
> - Value = (Hi4 << 16) | (i << 26) | (Mid3 << 12) | (Lo8);
> uint64_t swapped = (Value & 0xFFFF0000) >> 16;
> swapped |= (Value & 0x0000FFFF) << 16;
> return swapped;
I'm getting a bunch of unused variable warnings from this change.
/Volumes/storage/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp:198:14:
warning: unused variable 'Hi4' [-Wunused-variable]
unsigned Hi4 = (Value & 0xF000) >> 12;
^
/Volumes/storage/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp:199:14:
warning: unused variable 'i' [-Wunused-variable]
unsigned i = (Value & 0x800) >> 11;
^
/Volumes/storage/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp:200:14:
warning: unused variable 'Mid3' [-Wunused-variable]
unsigned Mid3 = (Value & 0x700) >> 8;
^
/Volumes/storage/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp:201:14:
warning: unused variable 'Lo8' [-Wunused-variable]
unsigned Lo8 = Value & 0x0FF;
^
-Eli
More information about the llvm-commits
mailing list