[PATCH] D95586: [ARM] permit PC as destination of MOVS

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 11:55:40 PST 2021


nickdesaulniers added a comment.

  $ arm-linux-gnueabi-as foo.s -o foo.o
  foo.s: Assembler messages:
  foo.s:1: Warning: using r15 results in unpredictable behaviour
  $ arm-linux-gnueabi-objdump -d foo.o    
  
  foo.o:     file format elf32-littlearm
  
  
  Disassembly of section .text:
  
  00000000 <.text>:
     0:   e1b0f211        lsls    pc, r1, r2      ; <UNPREDICTABLE>

so GNU as will assemble it, but GNU objdump acknowledges that this encoding is unpredictable (or does `<UNPREDICTABLE>` mean that modifying the program counter results in unpredictable control flow?).

So I guess I should:

1. send a kernel patch removing that test.
2. abandon this patch

Is that correct?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95586/new/

https://reviews.llvm.org/D95586



More information about the llvm-commits mailing list