[Lldb-commits] [PATCH] Address warnings in EmulateInstructionARM64

Greg Clayton gclayton at apple.com
Mon Apr 28 11:26:36 PDT 2014


These function emulate things that are in the ARM64 pseudo code in the ARM64 instruction documentation. Please "#if 0" out the SignExtend64(...) and LSL_C(...) functions in case they are needed for emulating other instructions in the future.

On Apr 28, 2014, at 7:04 AM, Ed Maste <emaste at freebsd.org> wrote:

> - Remove default for switch which covers all enumeration values
> - Remove unused functions
> 
> http://reviews.llvm.org/D3528
> 
> Files:
>  source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
>  source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
> 
> Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
> ===================================================================
> --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
> +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
> @@ -58,25 +58,6 @@
>     return ~x;
> }
> 
> -
> -static inline int64_t
> -SignExtend64(uint64_t x, uint32_t msbit) 
> -{
> -    return int64_t(x << (64 - msbit)) >> (64 - msbit);
> -}
> -
> -
> -// LSL_C() 
> -// =======
> -static inline uint64_t
> -LSL_C (uint64_t x, integer shift, bool &carry_out)
> -{
> -    assert (shift >= 0); 
> -    uint64_t result = x << shift;
> -    carry_out = ((1ull << (64-1)) >> (shift - 1)) != 0;
> -    return result;
> -}
> -
> // LSL()
> // =====
> 
> Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
> ===================================================================
> --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
> +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
> @@ -46,9 +46,6 @@
>             case lldb_private::eInstructionTypePCModifying:
>             case lldb_private::eInstructionTypeAll:
>                 return false;
> -                
> -            default:
> -                break;
>         }
>         return false;
>     }
> <D3528.8883.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list