Skip to content
  • Evan Cheng's avatar
    Some ARM implementaions, e.g. A-series, does return stack prediction. That is, · 87c7b09d
    Evan Cheng authored
    the processor keeps a return addresses stack (RAS) which stores the address
    and the instruction execution state of the instruction after a function-call
    type branch instruction.
    
    Calling a "noreturn" function with normal call instructions (e.g. bl) can
    corrupt RAS and causes 100% return misprediction so LLVM should use a
    unconditional branch instead. i.e.
    mov lr, pc
    b _foo
    The "mov lr, pc" is issued in order to get proper backtrace.
    
    rdar://8979299
    
    llvm-svn: 151623
    87c7b09d
Loading