• Ben Smith's avatar
    Enforce restriction on ARM strex{b,h} instruction · 44c52f7b
    Ben Smith authored
    The strex (Store Exclusive) instruction has the form:
    
        strex rd, rt, [rn]
    
    It stores the value in register rt at the address in register rn. If the
    store succeeds, then 0 is stored in rd, otherwise 1 is stored. The ARM
    manual says that behavior is "unpredictable" if d == n || d == t (i.e.
    those registers are aliased).
    
    We were not checking for this behavior in the assembler or simulator,
    and as a result were generating output where it occurred. This didn't
    always break; the tests we run on ARM hardware run this instruction and
    pass.
    
    BUG: chromium:786168
    
    Change-Id: I57fe3a1db406eac96eb04ef2246f6970548d3cf9
    Reviewed-on: https://chromium-review.googlesource.com/777777Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
    Commit-Queue: Ben Smith <binji@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49513}
    44c52f7b
assembler-arm.cc 180 KB