Skip to content
  • Luis Machado's avatar
    Fix shifting of negative value · 5382f971
    Luis Machado authored
    When UBSan is enabled, I noticed runtime errors complaining of shifting
    of negative numbers.
    
    This patch fixes this by reusing existing macros from the ARM port.
    
    It also removes unused macros from AArch64's port.
    
    gdb/ChangeLog:
    
    2020-12-04  Luis Machado  <luis.machado@linaro.org>
    
    	* aarch64-tdep.c (submask, bit, bits): Remove.
    	* arch/aarch64-insn.c (extract_signed_bitfield): Remove.
    	(aarch64_decode_adr, aarch64_decode_b aarch64_decode_bcond)
    	(aarch64_decode_cb, aarch64_decode_tb)
    	(aarch64_decode_ldr_literal): Use sbits to extract a signed
    	immediate.
    	* arch/aarch64-insn.h (submask, bits, bit, sbits): New macros.
    5382f971
To find the state of this project's repository at the time of any of these versions, check out the tags.