1. Jun 01, 2012
    • Jakob Stoklund Olesen's avatar
      Didn't mean to export this function. · afcfef14
      Jakob Stoklund Olesen authored
      llvm-svn: 157756
      afcfef14
    • Manman Ren's avatar
      X86: replace SUB with CMP if possible · 9bccb64e
      Manman Ren authored
      This patch will optimize the following
              movq    %rdi, %rax
              subq    %rsi, %rax
              cmovsq  %rsi, %rdi
              movq    %rdi, %rax
      to
              cmpq    %rsi, %rdi
              cmovsq  %rsi, %rdi
              movq    %rdi, %rax
      
      Perform this optimization if the actual result of SUB is not used.
      
      rdar: 11540023
      llvm-svn: 157755
      9bccb64e
    • Jakob Stoklund Olesen's avatar
      Add a PrintRegUnit helper similar to PrintReg. · fa9d7db1
      Jakob Stoklund Olesen authored
      Reg-units are named after their root registers, and most units have a
      single root, so they simply print as 'AL', 'XMM0', etc. The rare dual
      root reg-units print as FPSCR~FPSCR_NZCV, FP0~ST7, ...
      
      The printing piggybacks on the existing register name tables, so no
      extra const data space is required.
      
      llvm-svn: 157754
      fa9d7db1
    • Jakob Stoklund Olesen's avatar
      Emit register unit root tables. · 2be0a77a
      Jakob Stoklund Olesen authored
      Each register unit has one or two root registers. The full set of
      registers containing a given register unit can be computed as the union
      of the root registers and their super-registers.
      
      Provide an MCRegUnitRootIterator class to enumerate the roots.
      
      llvm-svn: 157753
      2be0a77a
    • Joel Jones's avatar
      Fix typos · 585bc824
      Joel Jones authored
      llvm-svn: 157752
      585bc824
    • Greg Clayton's avatar
      <rdar://problem/11486302> · d9896733
      Greg Clayton authored
      Fixed a case where multiple threads can be asking to send a packet to the GDB server and one of three things will happen:
      1 - everything works
      2 - one thread will fail to send the packet due to not being able to get the sequence mutex
      3 - one thread will try and interrupt the other packet sending and fail and not send the packet
      
      Now the flow is a bit different. Prior to this fix we did:
      
      if (try_get_sequence_mutex()) {
          send_packet()
          return success;
      } else {
         if (async_ok) {
             interrupt()
             send_packet() 
             resume()
             return success;
         }
      }
      return fail
      
      The issue is that the call to "try_get_sequence_mutex()" could fail if another thread was sending a packet and could cause us to just not send the packet and an error would be returned.
      
      What we really want is to try and get the sequence mutex, and if this succeeds, send the packet. Else check if we are running and if we are, do what we used to do. The big difference is when we aren't running, we wait for the sequence mutex so we don't drop packets. Pseudo code is:
      
      if (try_get_sequence_mutex()) {
          // Safe to send the packet right away
          send_packet()
          return success;
      } else {
          if (running) {
             // We are running, interrupt and send async packet if ok to do so,
             // else it is ok to fail
             if (async_ok) {
                 interrupt()
                 send_packet() 
                 resume()
                 return success;
              }
          }
          else {
              // Not running, wait for the sequence mutex so we don't drop packets
              get_sequence_mutex()
              send_packet()
              return success;
          }
      }
      return fail
      
      llvm-svn: 157751
      d9896733
    • Kostya Serebryany's avatar
      [asan] partial fix for windows build · 8a66b71c
      Kostya Serebryany authored
      llvm-svn: 157750
      8a66b71c
    • Rafael Espindola's avatar
      Fix typos noticed by Benjamin Kramer. · e3c5f3e5
      Rafael Espindola authored
      Also make the checks stronger and test that we reject ranges that overlap
      a previous wrapped range.
      
      llvm-svn: 157749
      e3c5f3e5
  2. May 31, 2012