• loislo's avatar
    CpuProfiler: fix for CollectDeoptEvents test on arm64 · 82e6824e
    loislo authored
    We use slightly different schema for JumpTable on arm64 than for x64.
    
    We do a branch (B) to the JumpTable from the code,
    then a branch (B) to the end of jump table code
    and then branch to the deoptimizer code with putting
    the return address into lr register (Call which is actually Blr).
    
    As a result the 'from' address in Deoptimizer always points to
    the end of JumpTable code and we can get nothing from this information.
    
    0) I moved save_doubles and needs_frame code out of for_loop.
    
    1) I replaced B commands with Bl so we put different return addresses
    to lr register for the different jump table entries and replaced
    the final Call with Br which do not touch lr register.
    
    Also I removed the last_entry check so we will always do the Bl
    even for the last entry because we need the right address in lr.
    I don't think that this will affect the performance because it
    just one more branch for entire deopt mechanics.
    
    BUG=chromium:452067
    LOG=n
    
    Review URL: https://codereview.chromium.org/984893003
    
    Cr-Commit-Position: refs/heads/master@{#27094}
    82e6824e
deoptimizer.h 36.3 KB